summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun2016-06-14 01:31:47 +0200
committerKishon Vijay Abraham I2016-06-17 15:14:24 +0200
commit075adb8046532d9642f411a92b4f385d04ced24d (patch)
treea003284df5f05bf9f11c341096a9b7aefa733e28
parentphy: rcar-gen3-usb2: fix unexpected repeat interrupts of VBUS change (diff)
downloadkernel-qcow2-linux-075adb8046532d9642f411a92b4f385d04ced24d.tar.gz
kernel-qcow2-linux-075adb8046532d9642f411a92b4f385d04ced24d.tar.xz
kernel-qcow2-linux-075adb8046532d9642f411a92b4f385d04ced24d.zip
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 <yongjun_wei@trendmicro.com.cn> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
-rw-r--r--drivers/phy/phy-rockchip-dp.c2
1 files changed, 1 insertions, 1 deletions
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;