[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181226055809.74979-1-kjlu@umn.edu>
Date: Tue, 25 Dec 2018 23:58:09 -0600
From: Kangjie Lu <kjlu@....edu>
To: kjlu@....edu
Cc: pakki001@....edu, Michael Krufky <mkrufky@...uxtv.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] usb: dvb: check status of mxl111sf_read_reg
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@....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)
Powered by blists - more mailing lists