]> git.baikalelectronics.ru Git - kernel.git/commit
media: dvb-usb: fix uninit-value in dvb_usb_adapter_dvb_init
authorDongliang Mu <mudongliangabcd@gmail.com>
Fri, 25 Jun 2021 05:33:27 +0000 (07:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:47:31 +0000 (09:47 +0200)
commit37fedbed19abe46cfa876599735fdc1821940c51
tree472eacd3a6fbb2a351d9fe1a8c537c899ee944fc
parente1b621c1c6e205b390c0a8a2b189371454351f1d
media: dvb-usb: fix uninit-value in dvb_usb_adapter_dvb_init

[ Upstream commit c5453769f77ce19a5b03f1f49946fd3f8a374009 ]

If dibusb_read_eeprom_byte fails, the mac address is not initialized.
And nova_t_read_mac_address does not handle this failure, which leads to
the uninit-value in dvb_usb_adapter_dvb_init.

Fix this by handling the failure of dibusb_read_eeprom_byte.

Reported-by: syzbot+e27b4fd589762b0b9329@syzkaller.appspotmail.com
Fixes: b5ea76141b7d ("[media] dvb-usb: move it to drivers/media/usb/dvb-usb")
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/dvb-usb/nova-t-usb2.c