diff options
author | Antti Palosaari <crope@iki.fi> | 2012-09-12 20:23:52 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-23 20:48:58 -0300 |
commit | e1e9e510bb8639ace59dcd1f8e6b5754dfbb9b44 (patch) | |
tree | d9c0109d2eaf33529f0431897982922948143b7a /drivers | |
parent | 2e35c66f138c6a4f50da863a82983a541f1c2a24 (diff) |
[media] af9015: correct few error codes
Plain '-1' is not very good error code. Use more suitable error
code definitions.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/af9015.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/af9015.c b/drivers/media/usb/dvb-usb-v2/af9015.c index a4be303edb4f..824f1911ee21 100644 --- a/drivers/media/usb/dvb-usb-v2/af9015.c +++ b/drivers/media/usb/dvb-usb-v2/af9015.c @@ -71,7 +71,7 @@ static int af9015_ctrl_msg(struct dvb_usb_device *d, struct req_t *req) default: dev_err(&d->udev->dev, "%s: unknown command=%d\n", KBUILD_MODNAME, req->cmd); - ret = -1; + ret = -EIO; goto error; } @@ -107,7 +107,7 @@ static int af9015_ctrl_msg(struct dvb_usb_device *d, struct req_t *req) if (rlen && buf[1]) { dev_err(&d->udev->dev, "%s: command failed=%d\n", KBUILD_MODNAME, buf[1]); - ret = -1; + ret = -EIO; goto error; } @@ -791,11 +791,11 @@ static int af9015_copy_firmware(struct dvb_usb_device *d) if (val == 0x04) { dev_err(&d->udev->dev, "%s: firmware did not run\n", KBUILD_MODNAME); - ret = -1; + ret = -ETIMEDOUT; } else if (val != 0x0c) { dev_err(&d->udev->dev, "%s: firmware boot timeout\n", KBUILD_MODNAME); - ret = -1; + ret = -ETIMEDOUT; } error: |