Re: [PATCH v9 2/2] scsi: ufs: core: Add support for static TX Equalization settings

From: Bart Van Assche

Date: Mon Jun 15 2026 - 09:40:51 EST


On 6/15/26 6:28 AM, Can Guo wrote:
+ prop = of_find_property(dev->of_node, prop_name, NULL);
+ if (!prop)
+ return 0;
+
+ count = of_property_count_u32_elems(dev->of_node, prop_name);
+ if (count < 0)
+ return count;

Can the above two of_*() calls be combined into a single of_*() call,
e.g. as follows?

count = of_property_count_u32_elems(dev->of_node, prop_name);
if (count == -EINVAL || count == -ENOENT)
return 0;
if (count < 0)
return count;

Thanks,

Bart.