linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dvb: check status of mxl111sf_read_reg
@ 2018-12-26  5:58 Kangjie Lu
  2018-12-27  3:47 ` Michael Ira Krufky
  0 siblings, 1 reply; 2+ messages in thread
From: Kangjie Lu @ 2018-12-26  5:58 UTC (permalink / raw)
  To: kjlu
  Cc: pakki001, Michael Krufky, Mauro Carvalho Chehab, linux-media,
	linux-kernel

When mxl111sf_read_reg fails, we shouldn't use "mode". The fix checks
its return value using mxl_fail

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
---
 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 ffb6e7c72f57..aecc3d02fc1e 100644
--- a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c
+++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c
@@ -130,7 +130,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.17.2 (Apple Git-113)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-27  3:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-26  5:58 [PATCH] usb: dvb: check status of mxl111sf_read_reg Kangjie Lu
2018-12-27  3:47 ` Michael Ira Krufky

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).