Skip to content

Commit

Permalink
[media] az6007: improve the error messages for az6007 read/write calls
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Jan 21, 2012
1 parent 2d5161b commit 9b01f3d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/media/dvb/dvb-usb/az6007.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,15 @@ static struct mt2063_config az6007_mt2063_config = {
static int az6007_read(struct usb_device *udev, u8 req, u16 value,
u16 index, u8 *b, int blen)
{
int ret = -1;
int ret;

ret = usb_control_msg(udev,
usb_rcvctrlpipe(udev, 0),
req,
USB_TYPE_VENDOR | USB_DIR_IN,
value, index, b, blen, 5000);

if (ret < 0) {
warn("usb in operation failed. (%d)", ret);
warn("usb read operation failed. (%d)", ret);
return -EIO;
}

Expand Down Expand Up @@ -151,7 +150,7 @@ static int az6007_write(struct usb_device *udev, u8 req, u16 value,
USB_TYPE_VENDOR | USB_DIR_OUT,
value, index, b, blen, 5000);
if (ret != blen) {
err("usb out operation failed. (%d)", ret);
err("usb write operation failed. (%d)", ret);
return -EIO;
}

Expand Down

0 comments on commit 9b01f3d

Please sign in to comment.