From: Wei Yongjun <yongjun_...@trendmicro.com.cn>

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_...@trendmicro.com.cn>
---
 drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c 
b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index 87fc0fe..1723407 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -1176,7 +1176,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;

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to