提交 d3765f08 编写于 作者: S Sergei Shtylyov 提交者: David S. Miller

phylib: simplify bogus phy_device_create() result

Get rid of the bogus string of type casts where ERR_PTR() is enough.
Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c1b3b199
......@@ -157,7 +157,7 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
/* We allocate the device, and initialize the default values */
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (NULL == dev)
return (struct phy_device *)PTR_ERR((void *)-ENOMEM);
return ERR_PTR(-ENOMEM);
dev->dev.release = phy_device_release;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册