]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: bdisp: remove unnecessary IS_ERR() check
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 17 Mar 2022 07:51:16 +0000 (08:51 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:18 +0000 (11:02 +0200)
The "bdisp->clock" variable cannot be an error pointer here.  No need to
check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c

index 5aa79d9277c885342b18af8d5846400d5786d590..dd74cc43920d3ce5a469bfa862c83d19b65d62d7 100644 (file)
@@ -1394,8 +1394,7 @@ err_remove:
        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;