media: mt312: fix a missing check of mt312 reset
authorKangjie Lu <kjlu@umn.edu>
Fri, 21 Dec 2018 07:07:20 +0000 (02:07 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 16 Jan 2019 16:44:09 +0000 (11:44 -0500)
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>
drivers/media/dvb-frontends/mt312.c

index 03e74a729168c31e51fddf40c42d3826ba75ca05..bfbb879469f2967b90661c9b35d51a7bfd98a675 100644 (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;
 }