diff mbox series

[v1,4/8] media: ov2740: Remove duplicate check for NULL fwnode

Message ID 20220726120556.2881-4-andriy.shevchenko@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [v1,1/8] media: ov2740: Remove duplicative pointer in struct nvm_data | expand

Commit Message

Andy Shevchenko July 26, 2022, 12:05 p.m. UTC
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>
---
 drivers/media/i2c/ov2740.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Cao, Bingbu July 27, 2022, 9:41 a.m. UTC | #1
Hi, Andy

Thanks for your patch.

Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
Cao, Bingbu July 27, 2022, 10:01 a.m. UTC | #2
Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
diff mbox series

Patch

diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c
index 9420258c6073..07fe8fda274e 100644
--- a/drivers/media/i2c/ov2740.c
+++ b/drivers/media/i2c/ov2740.c
@@ -1009,9 +1009,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;