Unverified Commit abea0cbf authored by Rob Herring (Arm)'s avatar Rob Herring (Arm) Committed by Mark Brown
Browse files

ASoC: simple-card: Drop unnecessary "dai-tdm-slot-width-map" property presence check



It doesn't matter whether "dai-tdm-slot-width-map" is not present or
there is some other issue parsing it in of_property_count_elems_of_size()
causing an error. Drop the presence check and rely on
of_property_count_elems_of_size() error return if not present.

Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
Acked-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20250109182202.3971965-2-robh@kernel.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 84eac6d4
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -139,10 +139,9 @@ int simple_util_parse_tdm_width_map(struct device *dev, struct device_node *np,
	int n, i, ret;
	u32 *p;

	if (!of_property_read_bool(np, "dai-tdm-slot-width-map"))
		return 0;

	n = of_property_count_elems_of_size(np, "dai-tdm-slot-width-map", sizeof(u32));
	if (n <= 0)
		return 0;
	if (n % 3) {
		dev_err(dev, "Invalid number of cells for dai-tdm-slot-width-map\n");
		return -EINVAL;