From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753038AbbH1Sej (ORCPT ); Fri, 28 Aug 2015 14:34:39 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:35600 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752674AbbH1Seh (ORCPT ); Fri, 28 Aug 2015 14:34:37 -0400 From: Sergei Shtylyov 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 Message-ID: <36033068.aJZvyM7bre@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.9 (Linux/4.1.5-100.fc21.x86_64; KDE/4.14.9; x86_64; ; ) In-Reply-To: <2163825.63u61975nF@wasted.cogentembedded.com> References: <2163825.63u61975nF@wasted.cogentembedded.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Get rid of the bogus string of type casts where ERR_PTR() is enough. Signed-off-by: Sergei Shtylyov --- 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;