summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2015-08-28 20:34:34 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-28 23:15:24 +0200
commitd3765f08d6f32f17ac898ec1f19957b322d4157f (patch)
tree1a62a36996bf2869ec31dc939e48986198c34c90 /drivers
parentnet: sched: don't break line in tc_classify loop notification (diff)
downloadlinux-d3765f08d6f32f17ac898ec1f19957b322d4157f.tar.xz
linux-d3765f08d6f32f17ac898ec1f19957b322d4157f.zip
phylib: simplify bogus phy_device_create() result
Get rid of the bogus string of type casts where ERR_PTR() is enough. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/phy_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 55f01788df5e..ff7dcb3e8f27 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -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;