Skip to content

Commit fd9cb96

Browse files
robherringmartinkpetersen
authored andcommitted
scsi: ufs: ufshcd-pltfrm: Use of_property_present()
Use of_property_present() to test for property presence rather than of_find_property(). This is part of a larger effort to remove callers of of_find_property() and similar functions. of_find_property() leaks the DT struct property and data pointers which is a problem for dynamically allocated nodes which may be freed. Signed-off-by: Rob Herring (Arm) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent ea6787c commit fd9cb96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ufs/host/ufshcd-pltfrm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,10 @@ static int ufshcd_parse_operating_points(struct ufs_hba *hba)
272272
const char **clk_names;
273273
int cnt, i, ret;
274274

275-
if (!of_find_property(np, "operating-points-v2", NULL))
275+
if (!of_property_present(np, "operating-points-v2"))
276276
return 0;
277277

278-
if (of_find_property(np, "freq-table-hz", NULL)) {
278+
if (of_property_present(np, "freq-table-hz")) {
279279
dev_err(dev, "%s: operating-points and freq-table-hz are incompatible\n",
280280
__func__);
281281
return -EINVAL;

0 commit comments

Comments
 (0)