summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-04-25 22:58:44 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-25 23:12:04 +0400
commitf327cabf7fc2a356e6eddfa51b1dc54c3bc625d9 (patch)
tree7d2a5b47b04028ccf43279d76a780a69213e4d48 /drivers
parenta3f17af2d97a2a51af37e7b1dab5de5562c9b66d (diff)
downloadlinux-f327cabf7fc2a356e6eddfa51b1dc54c3bc625d9.tar.xz
[media] cx25821-alsa: get rid of a __must_check warning
The hole reason for __must_check is to not ignore an error. However, a "ret" value is used at cx25821 just to avoid the Kernel compilation to compain about it. That, however, produces another warning (with W=1): drivers/media/pci/cx25821/cx25821-alsa.c: In function 'cx25821_audio_fini': drivers/media/pci/cx25821/cx25821-alsa.c:727:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] With the current implementation of driver_for_each_device() and cx25821_alsa_exit_callback(), there's actually just one very unlikely condition where it will currently produce an error: if driver_find() returns NULL. Ok, there's not much that can be done, as it is on a driver's function that returns void, but it can at least print some message if the error happens. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/pci/cx25821/cx25821-alsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/pci/cx25821/cx25821-alsa.c b/drivers/media/pci/cx25821/cx25821-alsa.c
index 81361c26c54e..6e91e84d6bf9 100644
--- a/drivers/media/pci/cx25821/cx25821-alsa.c
+++ b/drivers/media/pci/cx25821/cx25821-alsa.c
@@ -727,6 +727,8 @@ static void cx25821_audio_fini(void)
int ret;
ret = driver_for_each_device(drv, NULL, NULL, cx25821_alsa_exit_callback);
+ if (ret)
+ pr_err("%s failed to find a cx25821 driver.\n", __func__);
}
static int cx25821_alsa_init_callback(struct device *dev, void *data)