From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: netdev@vger.kernel.org
Cc: f.fainelli@gmail.com, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] phylib: simplify bogus phy_device_create() result
Date: Fri, 28 Aug 2015 21:34:34 +0300 [thread overview]
Message-ID: <36033068.aJZvyM7bre@wasted.cogentembedded.com> (raw)
In-Reply-To: <2163825.63u61975nF@wasted.cogentembedded.com>
Get rid of the bogus string of type casts where ERR_PTR() is enough.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
drivers/net/phy/phy_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: net-next/drivers/net/phy/phy_device.c
===================================================================
--- net-next.orig/drivers/net/phy/phy_device.c
+++ net-next/drivers/net/phy/phy_device.c
@@ -157,7 +157,7 @@ struct phy_device *phy_device_create(str
/* 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;
next prev parent reply other threads:[~2015-08-28 18:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 18:33 [PATCH 0/2] Some phylib simplifications Sergei Shtylyov
2015-08-28 18:34 ` Sergei Shtylyov [this message]
2015-08-28 18:35 ` [PATCH 2/2] phylib: simplify NULL checks Sergei Shtylyov
2015-08-28 21:15 ` [PATCH 0/2] Some phylib simplifications David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36033068.aJZvyM7bre@wasted.cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome