OSDN Git Service

media: ov2740: Remove duplicate check for NULL fwnode
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 26 Jul 2022 12:05:52 +0000 (13:05 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 25 Nov 2022 08:38:40 +0000 (08:38 +0000)
fwnode API does proper checks and returns correct codes, no need
to repeat it in the caller.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov2740.c

index d9d5ef2..00ae065 100644 (file)
@@ -991,9 +991,6 @@ static int ov2740_check_hwcfg(struct device *dev)
        int ret;
        unsigned int i, j;
 
-       if (!fwnode)
-               return -ENXIO;
-
        ret = fwnode_property_read_u32(fwnode, "clock-frequency", &mclk);
        if (ret)
                return ret;