Skip to content

Commit

Permalink
V4L/DVB: media/az6027: handle -EIO failure
Browse files Browse the repository at this point in the history
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: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent 32ec457 commit a18e659
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/media/dvb/dvb-usb/az6027.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,7 @@ static int az6027_ci_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int o
} else
ret = 0;

if (b[0] == 0) {
ret = 0;

} else if (b[0] == 1) {
if (!ret && b[0] == 1) {
ret = DVB_CA_EN50221_POLL_CAM_PRESENT |
DVB_CA_EN50221_POLL_CAM_READY;
}
Expand Down

0 comments on commit a18e659

Please sign in to comment.