提交 0cb64f02 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

[media] cx23885: handle errors from videobuf_dvb_get_frontend()

The error handling in the original code wasn't complete so static
checkers complained about a potential NULL deference.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 149709f5
......@@ -1550,7 +1550,6 @@ static int cx23885_set_freq_via_ops(struct cx23885_dev *dev,
struct v4l2_control ctrl;
struct videobuf_dvb_frontend *vfe;
struct dvb_frontend *fe;
int err = 0;
struct analog_parameters params = {
.mode = V4L2_TUNER_ANALOG_TV,
......@@ -1572,8 +1571,10 @@ static int cx23885_set_freq_via_ops(struct cx23885_dev *dev,
params.frequency, f->tuner, params.std);
vfe = videobuf_dvb_get_frontend(&dev->ts2.frontends, 1);
if (!vfe)
err = -EINVAL;
if (!vfe) {
mutex_unlock(&dev->lock);
return -EINVAL;
}
fe = vfe->dvb.frontend;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册