v4l: fwnode: Drop redunant -ENODATA check in property reference parsing
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 23 Feb 2022 11:47:48 +0000 (13:47 +0200)
committerSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 3 Mar 2022 22:27:07 +0000 (00:27 +0200)
The check of -ENODATA return value from
fwnode_property_get_reference_args() was made redundant by commit
c343bc2ce2c6 ("ACPI: properties: Align return codes of
__acpi_node_get_property_reference()"). -ENOENT remains to be used to
signal there are no further entries.

Remove the check for -ENODATA.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/media/v4l2-core/v4l2-fwnode.c

index 71dcc9a..ae14044 100644 (file)
@@ -903,11 +903,7 @@ static int v4l2_fwnode_reference_parse(struct device *dev,
        if (!index)
                return -ENOENT;
 
-       /*
-        * Note that right now both -ENODATA and -ENOENT may signal
-        * out-of-bounds access. Return the error in cases other than that.
-        */
-       if (ret != -ENOENT && ret != -ENODATA)
+       if (ret != -ENOENT)
                return ret;
 
        for (index = 0;