Re: [PATCH] media: dvb_frontend: Fix uninitialized error in dvb_frontend_handle_ioctl()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 16, 2017 at 11:51 AM, Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:
> With gcc-4.1.2:
>
>     drivers/media/dvb-core/dvb_frontend.c: In function ‘dvb_frontend_handle_ioctl’:
>     drivers/media/dvb-core/dvb_frontend.c:2110: warning: ‘err’ may be used uninitialized in this function
>
> Indeed, there are 13 cases where err is used initialized if one of the
> dvb_frontend_ops is not implemented.
>
> Preinitialize err to -EOPNOTSUPP like before to fix this.
>
> Fixes: d73dcf0cdb95a47f ("media: dvb_frontend: cleanup ioctl handling logic")
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Good catch!

This one shows up on x86 allmdoconfig with gcc-4.5 or older but not gcc-4.6.

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux