Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Wei Yongjun and committed by
Mauro Carvalho Chehab
250d2ff0 59c0d7b1

+1 -1
+1 -1
drivers/media/usb/dvb-usb-v2/rtl28xxu.c
··· 1293 1293 "rtl2832_sdr", 1294 1294 PLATFORM_DEVID_AUTO, 1295 1295 &pdata, sizeof(pdata)); 1296 - if (pdev == NULL || pdev->dev.driver == NULL) 1296 + if (IS_ERR(pdev) || pdev->dev.driver == NULL) 1297 1297 break; 1298 1298 dev->platform_device_sdr = pdev; 1299 1299 break;