mirror of
https://github.com/torvalds/linux.git
synced 2024-12-21 10:31:54 +00:00
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>
This commit is contained in:
parent
c1b3b19923
commit
d3765f08d6
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user