From: Kangjie Lu Date: Fri, 21 Dec 2018 07:07:20 +0000 (-0500) Subject: media: mt312: fix a missing check of mt312 reset X-Git-Tag: v5.1-rc1~88^2~311 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=9502cdf0807058a10029488052b064cecceb7fc9;p=linux.git media: mt312: fix a missing check of mt312 reset mt312_reset() may fail. Although it is called in the end of mt312_set_frontend(), we better check its status and return its error code upstream instead of 0. Signed-off-by: Kangjie Lu Reviewed-by: Matthias Schwarzott Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/mt312.c b/drivers/media/dvb-frontends/mt312.c index 03e74a729168..bfbb879469f2 100644 --- a/drivers/media/dvb-frontends/mt312.c +++ b/drivers/media/dvb-frontends/mt312.c @@ -645,7 +645,9 @@ static int mt312_set_frontend(struct dvb_frontend *fe) if (ret < 0) return ret; - mt312_reset(state, 0); + ret = mt312_reset(state, 0); + if (ret < 0) + return ret; return 0; }