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>
default:
dev_err(&d->udev->dev, "%s: unknown command=%d\n",
KBUILD_MODNAME, req->cmd);
- ret = -1;
+ ret = -EIO;
goto error;
}
if (rlen && buf[1]) {
dev_err(&d->udev->dev, "%s: command failed=%d\n",
KBUILD_MODNAME, buf[1]);
- ret = -1;
+ ret = -EIO;
goto error;
}
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: