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@xxxxxxx> --- 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)