media: dvb-usb: fix uninit-value in vp702x_read_mac_addr
authorDongliang Mu <mudongliangabcd@gmail.com>
Fri, 25 Jun 2021 05:59:04 +0000 (07:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 09:42:59 +0000 (11:42 +0200)
commita715a58207c073b25a9b0b1820c6381a2dd24466
treeab35dac6f624510be0074820bf29214d271444cc
parentdd87efbeac57711c0037101987a92f4671040de2
media: dvb-usb: fix uninit-value in vp702x_read_mac_addr

[ Upstream commit 797c061ad715a9a1480eb73f44b6939fbe3209ed ]

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

Fix this by handling the failure of vp702x_usb_in_op.

Fixes: 786baecfe78f ("[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/vp702x.c