* [PATCH] [media] mxl111sf: Check return value in mxl111sf_config_mpeg_in
@ 2022-12-22 21:46 Artem Chernyshev
[not found] ` <CAOcJUby8i=vRu5-cSe6iBKrnLG8ucmatpiPT=VaMS9etwHH_uw@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Artem Chernyshev @ 2022-12-22 21:46 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Artem Chernyshev, Michael Krufky, linux-media, linux-kernel,
lvc-project
Error check after mxl111sf_read_reg
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 4c66c9205c07 ("[media] dvb-usb: add ATSC support for the Hauppauge WinTV-Aero-M")
Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
---
drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c
index 40b26712ba4c..ad1888514bd0 100644
--- a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c
+++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c
@@ -121,7 +121,8 @@ int mxl111sf_config_mpeg_in(struct mxl111sf_state *state,
mxl_fail(ret);
/* Configure MPEG Clock phase */
- mxl111sf_read_reg(state, V6_MPEG_IN_CLK_INV_REG, &mode);
+ ret = mxl111sf_read_reg(state, V6_MPEG_IN_CLK_INV_REG, &mode);
+ mxl_fail(ret);
if (clock_phase == TSIF_NORMAL)
mode &= ~V6_INVERTED_CLK_PHASE;
--
2.30.3
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <CAOcJUby8i=vRu5-cSe6iBKrnLG8ucmatpiPT=VaMS9etwHH_uw@mail.gmail.com>]
* Re: [PATCH] [media] mxl111sf: Check return value in mxl111sf_config_mpeg_in [not found] ` <CAOcJUby8i=vRu5-cSe6iBKrnLG8ucmatpiPT=VaMS9etwHH_uw@mail.gmail.com> @ 2022-12-23 16:28 ` Artem Chernyshev 2023-08-18 14:32 ` Hans Verkuil 0 siblings, 1 reply; 3+ messages in thread From: Artem Chernyshev @ 2022-12-23 16:28 UTC (permalink / raw) To: Michael Ira Krufky; +Cc: Mauro Carvalho Chehab, linux-media, LKML, lvc-project Hi, On Fri, Dec 23, 2022 at 07:28:47AM -0500, Michael Ira Krufky wrote: > On Thu, Dec 22, 2022, 4:46 PM Artem Chernyshev <artem.chernyshev@red-soft.ru> > wrote: > > > Error check after mxl111sf_read_reg > > > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > > > Fixes: 4c66c9205c07 ("[media] dvb-usb: add ATSC support for the Hauppauge > > WinTV-Aero-M") > > Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru> > > --- > > drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c > > b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c > > index 40b26712ba4c..ad1888514bd0 100644 > > --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c > > +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c > > @@ -121,7 +121,8 @@ int mxl111sf_config_mpeg_in(struct mxl111sf_state > > *state, > > mxl_fail(ret); > > > > /* Configure MPEG Clock phase */ > > - mxl111sf_read_reg(state, V6_MPEG_IN_CLK_INV_REG, &mode); > > + ret = mxl111sf_read_reg(state, V6_MPEG_IN_CLK_INV_REG, &mode); > > + mxl_fail(ret); > > > > if (clock_phase == TSIF_NORMAL) > > mode &= ~V6_INVERTED_CLK_PHASE; > > -- > > 2.30.3 > > > > Artem, > > Thank you for this. If I recall correctly, the read from that particular > register often returns a failure despite the correct value being read into > memory. This needs to be tested before being merged, and if my memory is > correct about this we should add a comment about it. Unfortunately, I'm out > of town at the moment, I won't be able to test this for some time. Can we > hold off on this one for a bit? If you don't hear from me after a few > weeks, please feel free to ping me again. Thanks. > > Best, > Michael Krufky > > > Thanks for reply. I'll be waiting for your decision Best regards, Artem ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] mxl111sf: Check return value in mxl111sf_config_mpeg_in 2022-12-23 16:28 ` Artem Chernyshev @ 2023-08-18 14:32 ` Hans Verkuil 0 siblings, 0 replies; 3+ messages in thread From: Hans Verkuil @ 2023-08-18 14:32 UTC (permalink / raw) To: Artem Chernyshev, Michael Ira Krufky Cc: Mauro Carvalho Chehab, linux-media, LKML, lvc-project On 23/12/2022 17:28, Artem Chernyshev wrote: > Hi, > On Fri, Dec 23, 2022 at 07:28:47AM -0500, Michael Ira Krufky wrote: >> On Thu, Dec 22, 2022, 4:46 PM Artem Chernyshev <artem.chernyshev@red-soft.ru> >> wrote: >> >>> Error check after mxl111sf_read_reg >>> >>> Found by Linux Verification Center (linuxtesting.org) with SVACE. >>> >>> Fixes: 4c66c9205c07 ("[media] dvb-usb: add ATSC support for the Hauppauge >>> WinTV-Aero-M") >>> Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru> >>> --- >>> drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c >>> b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c >>> index 40b26712ba4c..ad1888514bd0 100644 >>> --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c >>> +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c >>> @@ -121,7 +121,8 @@ int mxl111sf_config_mpeg_in(struct mxl111sf_state >>> *state, >>> mxl_fail(ret); >>> >>> /* Configure MPEG Clock phase */ >>> - mxl111sf_read_reg(state, V6_MPEG_IN_CLK_INV_REG, &mode); >>> + ret = mxl111sf_read_reg(state, V6_MPEG_IN_CLK_INV_REG, &mode); >>> + mxl_fail(ret); >>> >>> if (clock_phase == TSIF_NORMAL) >>> mode &= ~V6_INVERTED_CLK_PHASE; >>> -- >>> 2.30.3 >>> >> >> Artem, >> >> Thank you for this. If I recall correctly, the read from that particular >> register often returns a failure despite the correct value being read into >> memory. This needs to be tested before being merged, and if my memory is >> correct about this we should add a comment about it. Unfortunately, I'm out >> of town at the moment, I won't be able to test this for some time. Can we >> hold off on this one for a bit? If you don't hear from me after a few >> weeks, please feel free to ping me again. Thanks. >> >> Best, >> Michael Krufky >> >>> > > Thanks for reply. I'll be waiting for your decision I'll drop this patch, I never saw a follow-up on this. If this is really needed, then just resend. Regards, Hans > > Best regards, > Artem ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-18 14:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-22 21:46 [PATCH] [media] mxl111sf: Check return value in mxl111sf_config_mpeg_in Artem Chernyshev
[not found] ` <CAOcJUby8i=vRu5-cSe6iBKrnLG8ucmatpiPT=VaMS9etwHH_uw@mail.gmail.com>
2022-12-23 16:28 ` Artem Chernyshev
2023-08-18 14:32 ` Hans Verkuil
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox