]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: dvb-usb-v2: af9035: fix ISO C90 compilation error on af9035_i2c_master_xfer
authorDesnes Nunes <desnesn@redhat.com>
Thu, 19 Sep 2024 17:27:55 +0000 (14:27 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2025 09:02:02 +0000 (10:02 +0100)
commit6ab52eaff6c2628c646bd7af5e33b95a97e660bd
treec62e9b87c1c5753961b0610c5821024bc5467e8d
parente8dddb171c4570c75a079e610927594a315abe81
media: dvb-usb-v2: af9035: fix ISO C90 compilation error on af9035_i2c_master_xfer

[ Upstream commit c36b9ad1a8add3c114e25fe167efa217a813b0c7 ]

This fixes a 'ISO C90 forbids mixed declarations and code' compilation
error on af9035_i2c_master_xfer, which is caused by the sanity check added
on user controlled msg[i], before declaring the demodulator register.

Fixes: 7bf744f2de0a ("media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer")
Signed-off-by: Desnes Nunes <desnesn@redhat.com>
Link: https://lore.kernel.org/r/20240919172755.196907-1-desnesn@redhat.com
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/dvb-usb-v2/af9035.c