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 <kjlu@umn.edu>
Reviewed-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Kangjie Lu 2018-12-21 02:07:20 -05:00 committed by Mauro Carvalho Chehab
parent c9b7d8f252
commit 9502cdf080
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}