]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] az6007: improve the error messages for az6007 read/write calls
authorMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 29 Jul 2011 14:40:40 +0000 (11:40 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 21 Jan 2012 15:45:58 +0000 (13:45 -0200)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/az6007.c

index c9743ee2ba75ab9ec7ff76e2f81bfbaef128dc76..c9b6f807790502c7c3499aefbe7d42381d70a704 100644 (file)
@@ -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;
        }
 
@@ -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;
        }