diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-09-04 10:08:17 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-05 15:26:33 -0300 |
commit | dc4af7821f4b74c06e536162d43614a95c51ffe5 (patch) | |
tree | bc52629e8c8dc051ca850c04d962ba95586a6893 /drivers/media | |
parent | 24b923f073ac37eb744f56a2c7f77107b8219ab2 (diff) | |
download | linux-dc4af7821f4b74c06e536162d43614a95c51ffe5.tar.gz |
[media] cx231xx: prints error code if can't switch TV mode
If something bad happens when switching between digital
and analog mode, prints an error and outputs the returned code.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-core.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c b/drivers/media/usb/cx231xx/cx231xx-core.c index 97730cb2f591..59b72264a0bf 100644 --- a/drivers/media/usb/cx231xx/cx231xx-core.c +++ b/drivers/media/usb/cx231xx/cx231xx-core.c @@ -746,7 +746,14 @@ int cx231xx_set_mode(struct cx231xx *dev, enum cx231xx_mode set_mode) } } - return errCode ? -EINVAL : 0; + if (errCode < 0) { + dev_err(dev->dev, "Failed to set devmode to %s: error: %i", + dev->mode == CX231XX_DIGITAL_MODE ? "digital" : "analog", + errCode); + return errCode; + } + + return 0; } EXPORT_SYMBOL_GPL(cx231xx_set_mode); |