Commit a18e6591 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

V4L/DVB: media/az6027: handle -EIO failure

If the az6027_usb_in_op() returns a negative errno ret is -EIO and in
that case the value of b[0] may be undefined.  The original code
assigned 0 to ret, but since it's already 0 now we can skip that.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 32ec4576
...@@ -701,10 +701,7 @@ static int az6027_ci_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int o ...@@ -701,10 +701,7 @@ static int az6027_ci_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int o
} else } else
ret = 0; ret = 0;
if (b[0] == 0) { if (!ret && b[0] == 1) {
ret = 0;
} else if (b[0] == 1) {
ret = DVB_CA_EN50221_POLL_CAM_PRESENT | ret = DVB_CA_EN50221_POLL_CAM_PRESENT |
DVB_CA_EN50221_POLL_CAM_READY; DVB_CA_EN50221_POLL_CAM_READY;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment