Skip to contentSkip to conversation

media: bdisp: remove unnecessary IS_ERR() check

PATCH New Dan Carpenter 1 participant 1 message Mar 17, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: bdisp: remove unnecessary IS_ERR() check

The "bdisp->clock" variable cannot be an error pointer here. No need to check.

---
 drivers/media/platform/stm/sti/bdisp/bdisp-v4l2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/platform/stm/sti/bdisp/bdisp-v4l2.c +1 -2
index 5aa79d9277c8..dd74cc43920d 100644
@@ -1394,8 +1394,7 @@ static int bdisp_probe(struct platform_device *pdev)
 	bdisp_debugfs_remove(bdisp);
 	v4l2_device_unregister(&bdisp->v4l2_dev);
 err_clk:
-	if (!IS_ERR(bdisp->clock))
-		clk_unprepare(bdisp->clock);
+	clk_unprepare(bdisp->clock);
 err_wq:
 	destroy_workqueue(bdisp->work_queue);
 	return ret;
Signature · 1 line
2.20.1