Skip to content

Commit

Permalink
media: mt312: fix a missing check of mt312 reset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kangjie Lu authored and Mauro Carvalho Chehab committed Jan 16, 2019
1 parent c9b7d8f commit 9502cdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/dvb-frontends/mt312.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9502cdf

Please sign in to comment.