aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-05-04 08:31:13 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:59:05 -0400
commita18e659170b9c551749e1c8cb5a969ea8d73e378 (patch)
treeac35097a920ca9026c183be87d525a3e60d4a0f9
parent32ec4576c3fb37316b1d11a04b220527822f3f0d (diff)
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: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/dvb-usb/az6027.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/dvb/dvb-usb/az6027.c b/drivers/media/dvb/dvb-usb/az6027.c
index baaa301c5768..6681ac1c56e3 100644
--- a/drivers/media/dvb/dvb-usb/az6027.c
+++ b/drivers/media/dvb/dvb-usb/az6027.c
@@ -701,10 +701,7 @@ static int az6027_ci_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int o
701 } else 701 } else
702 ret = 0; 702 ret = 0;
703 703
704 if (b[0] == 0) { 704 if (!ret && b[0] == 1) {
705 ret = 0;
706
707 } else if (b[0] == 1) {
708 ret = DVB_CA_EN50221_POLL_CAM_PRESENT | 705 ret = DVB_CA_EN50221_POLL_CAM_PRESENT |
709 DVB_CA_EN50221_POLL_CAM_READY; 706 DVB_CA_EN50221_POLL_CAM_READY;
710 } 707 }