* [PATCH 00/11] Address some smatch warnings
@ 2021-06-16 12:28 Mauro Carvalho Chehab
2021-06-16 12:28 ` [PATCH 04/11] media: sun6i-csi: add a missing return code Mauro Carvalho Chehab
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2021-06-16 12:28 UTC (permalink / raw)
Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, Chen-Yu Tsai,
Hans Verkuil, Jernej Skrabec, Mauro Carvalho Chehab,
Maxime Ripard, Yong Deng, linux-arm-kernel, linux-kernel,
linux-media, linux-sunxi
There are currently a couple of smatch warnings at the media subsystem.
This series fix several of them. The end goal is to reduce smatch warnings
to be close to zero, but there are still some work to be done. I'll likely
submit another round along this week.
Mauro Carvalho Chehab (11):
media: dvb_ca_en50221: avoid speculation from CA slot
media: dvb_net: avoid speculation from net slot
media: dvbdev: fix error logic at dvb_register_device()
media: sun6i-csi: add a missing return code
media: saa7134: use more meaninful goto labels
media: saa7134: fix saa7134_initdev error handling logic
media: siano: fix device register error path
media: adv7842: better document EDID block size
media: ttusb-dec: cleanup an error handling logic
media: dvb-core: frontend: make GET/SET safer
media: xilinx: simplify get fourcc logic
drivers/media/common/siano/smsdvb-main.c | 4 +
drivers/media/dvb-core/dvb_ca_en50221.c | 1 +
drivers/media/dvb-core/dvb_frontend.c | 213 ++++++++++--------
drivers/media/dvb-core/dvb_net.c | 25 +-
drivers/media/dvb-core/dvbdev.c | 3 +
drivers/media/i2c/adv7842.c | 33 ++-
drivers/media/pci/saa7134/saa7134-core.c | 39 ++--
.../platform/sunxi/sun6i-csi/sun6i_video.c | 4 +-
drivers/media/platform/xilinx/xilinx-dma.c | 5 +-
drivers/media/platform/xilinx/xilinx-vip.c | 6 +-
drivers/media/usb/ttusb-dec/ttusb_dec.c | 25 +-
11 files changed, 201 insertions(+), 157 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 04/11] media: sun6i-csi: add a missing return code
2021-06-16 12:28 [PATCH 00/11] Address some smatch warnings Mauro Carvalho Chehab
@ 2021-06-16 12:28 ` Mauro Carvalho Chehab
2021-06-17 5:37 ` yong
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2021-06-16 12:28 UTC (permalink / raw)
Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, Chen-Yu Tsai,
Jernej Skrabec, Mauro Carvalho Chehab, Maxime Ripard, Yong Deng,
linux-arm-kernel, linux-kernel, linux-media, linux-sunxi
As pointed by smatch, there's a missing return code:
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:485 sun6i_video_open() warn: missing error code 'ret'
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
index 3181d0781b61..07b2161392d2 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
@@ -481,8 +481,10 @@ static int sun6i_video_open(struct file *file)
goto fh_release;
/* check if already powered */
- if (!v4l2_fh_is_singular_file(file))
+ if (!v4l2_fh_is_singular_file(file)) {
+ ret = -EBUSY;
goto unlock;
+ }
ret = sun6i_csi_set_power(video->csi, true);
if (ret < 0)
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 04/11] media: sun6i-csi: add a missing return code
2021-06-16 12:28 ` [PATCH 04/11] media: sun6i-csi: add a missing return code Mauro Carvalho Chehab
@ 2021-06-17 5:37 ` yong
0 siblings, 0 replies; 3+ messages in thread
From: yong @ 2021-06-17 5:37 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: linuxarm, mauro.chehab, Chen-Yu Tsai, Jernej Skrabec,
Mauro Carvalho Chehab, Maxime Ripard, linux-arm-kernel,
linux-kernel, linux-media, linux-sunxi
Hi,
It does not mean there is a error. As the comment, it just check if the
csi is powered.
On Wed, 16 Jun 2021 14:28:30 +0200
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:
> As pointed by smatch, there's a missing return code:
>
> drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:485
> sun6i_video_open() warn: missing error code 'ret'
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c
> b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c index
> 3181d0781b61..07b2161392d2 100644 ---
> a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c +++
> b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c @@ -481,8
> +481,10 @@ static int sun6i_video_open(struct file *file) goto
> fh_release;
> /* check if already powered */
> - if (!v4l2_fh_is_singular_file(file))
> + if (!v4l2_fh_is_singular_file(file)) {
> + ret = -EBUSY;
> goto unlock;
> + }
>
> ret = sun6i_csi_set_power(video->csi, true);
> if (ret < 0)
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-17 6:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 12:28 [PATCH 00/11] Address some smatch warnings Mauro Carvalho Chehab
2021-06-16 12:28 ` [PATCH 04/11] media: sun6i-csi: add a missing return code Mauro Carvalho Chehab
2021-06-17 5:37 ` yong
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).