summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Goodbody <[email protected]>2025-09-25 12:56:44 +0100
committerMarek Vasut <[email protected]>2025-10-28 16:33:15 +0100
commit76d3b665310885f1a13ff83e818bb42f2cf26213 (patch)
treea43e6d6dd9b3666ea8785c45d183bd0a1f881443
parente41e6feb3d3b33f0793df6a1d9da20c8096a346e (diff)
usb: fsl-dt-fixup: Return an error code on error
fsl_fdt_fixup_usb_erratum uses strcmp to detect an error but then returns 'err' without it being set to an error. Calling code may not detect that an error occurred leading to a silent failure. Instead just return -EINVAL. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
-rw-r--r--drivers/usb/common/fsl-dt-fixup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/common/fsl-dt-fixup.c b/drivers/usb/common/fsl-dt-fixup.c
index 6a68bd76c27..55176f7a871 100644
--- a/drivers/usb/common/fsl-dt-fixup.c
+++ b/drivers/usb/common/fsl-dt-fixup.c
@@ -99,7 +99,7 @@ static int fsl_fdt_fixup_usb_erratum(void *blob, const char *prop_erratum,
else
node_name = node_type;
if (strcmp(node_name, controller_type))
- return err;
+ return -EINVAL;
err = fdt_setprop(blob, node_offset, prop_erratum, NULL, 0);
if (err < 0) {