]> Git Repo - linux.git/commitdiff
phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()
authorWei Yongjun <[email protected]>
Mon, 13 Jun 2016 23:31:47 +0000 (23:31 +0000)
committerKishon Vijay Abraham I <[email protected]>
Fri, 17 Jun 2016 13:14:24 +0000 (18:44 +0530)
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 <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
drivers/phy/phy-rockchip-dp.c

index 793ecb6d87bcaa2a56a914b2745bea6453929637..8b267a746576f03be24adf5dec028d45289e31ea 100644 (file)
@@ -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;
This page took 0.060453 seconds and 4 git commands to generate.