[<prev] [next>] [day] [month] [year] [list]
Message-Id: <175426fbef213fe76e3bdd60a64ee03f2a0dd3af.1635836077.git.mchehab+huawei@kernel.org>
Date: Tue, 2 Nov 2021 06:54:41 +0000
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: linuxarm@...wei.com, mauro.chehab@...wei.com,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Aditya Srivastava <yashsri421@...il.com>,
Aline Santana Cordeiro <alinesantanacordeiro@...il.com>,
Baokun Li <libaokun1@...wei.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kaixu Xia <kaixuxia@...cent.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev,
Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH] media: atomisp: add a default case at __get_frame_info()
The switch() logic there misses a break and a default case.
That makes it more prone to problems as the code change.
Suggested-by: Andy Shevchenko <andy.shevchenko@...il.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
index 1309855bb6c8..a8972b231e06 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
@@ -2691,9 +2691,11 @@ static int __get_frame_info(struct atomisp_sub_device *asd,
*info = p_info.output_info[1];
dev_dbg(isp->dev, "getting second main frame info.\n");
break;
+ default:
case ATOMISP_CSS_RAW_FRAME:
*info = p_info.raw_output_info;
dev_dbg(isp->dev, "getting raw frame info.\n");
+ break;
}
dev_dbg(isp->dev, "get frame info: w=%d, h=%d, num_invalid_frames %d.\n",
info->res.width, info->res.height, p_info.num_invalid_frames);
--
2.31.1
Powered by blists - more mailing lists