mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
[media] rtl28xxu: fix return value check in rtl2832u_tuner_attach()
In case of error, the function platform_device_register_data() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
59c0d7b1e4
commit
250d2ff016
1 changed files with 1 additions and 1 deletions
|
|
@ -1293,7 +1293,7 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap)
|
|||
"rtl2832_sdr",
|
||||
PLATFORM_DEVID_AUTO,
|
||||
&pdata, sizeof(pdata));
|
||||
if (pdev == NULL || pdev->dev.driver == NULL)
|
||||
if (IS_ERR(pdev) || pdev->dev.driver == NULL)
|
||||
break;
|
||||
dev->platform_device_sdr = pdev;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue