• Mauro Carvalho Chehab's avatar
    [media] cx25821-alsa: get rid of a __must_check warning · f327cabf
    Mauro Carvalho Chehab authored
    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: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    f327cabf
cx25821-alsa.c 19 KB