From: Dheeraj Reddy Jonnalagadda Date: Tue, 19 Nov 2024 07:26:53 +0000 (+0530) Subject: media: rkisp1: Fix unused value issue X-Git-Tag: v6.14-rc1~91^2~132 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86e5e8efb82cbee416e726e141decdc9e1a2d5f3;p=thirdparty%2Fkernel%2Flinux.git media: rkisp1: Fix unused value issue This commit fixes an unused value issue detected by Coverity (CID 1519008). The error condition for the invalid MIPI CSI-2 is not properly handled as the break statement would only exit the switch block and not the entire loop. Fix this by breaking from the look immediately after the switch block when an error occurs. Signed-off-by: Dheeraj Reddy Jonnalagadda Fixes: 7d4f126fde89 ("media: rkisp1: Make the internal CSI-2 receiver optional") Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Link: https://lore.kernel.org/r/20241119072653.72260-1-dheeraj.linuxdev@gmail.com Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c index 0100b9c3edbef..dc65a7924f8ae 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c @@ -228,6 +228,9 @@ static int rkisp1_subdev_notifier_register(struct rkisp1_device *rkisp1) break; } + if (ret) + break; + /* Parse the endpoint and validate the bus type. */ ret = v4l2_fwnode_endpoint_parse(ep, &vep); if (ret) {