* [PATCH] media: atomisp: add a default case at __get_frame_info()
@ 2021-11-02 6:54 Mauro Carvalho Chehab
0 siblings, 0 replies; only message in thread
From: Mauro Carvalho Chehab @ 2021-11-02 6:54 UTC (permalink / raw)
Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, Aditya Srivastava,
Aline Santana Cordeiro, Baokun Li, Greg Kroah-Hartman, Kaixu Xia,
Mauro Carvalho Chehab, Sakari Ailus, linux-kernel, linux-media,
linux-staging, Andy Shevchenko
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@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-02 6:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 6:54 [PATCH] media: atomisp: add a default case at __get_frame_info() Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).