Skip to content

Commit

Permalink
phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Kishon Vijay Abraham I committed Jun 17, 2016
1 parent 6762925 commit 075adb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/phy/phy-rockchip-dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 075adb8

Please sign in to comment.