From: Wei Yongjun Date: Mon, 13 Jun 2016 23:31:47 +0000 (+0000) Subject: phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=075adb8046532d9642f411a92b4f385d04ced24d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe() In case of error, the function devm_kzalloc() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I --- diff --git a/drivers/phy/phy-rockchip-dp.c b/drivers/phy/phy-rockchip-dp.c index 793ecb6d87bc..8b267a746576 100644 --- a/drivers/phy/phy-rockchip-dp.c +++ b/drivers/phy/phy-rockchip-dp.c @@ -90,7 +90,7 @@ static int rockchip_dp_phy_probe(struct platform_device *pdev) return -ENODEV; dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL); - if (IS_ERR(dp)) + if (!dp) return -ENOMEM; dp->dev = dev;