From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753954AbbCEBoM (ORCPT ); Wed, 4 Mar 2015 20:44:12 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:42785 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753673AbbCEBoK (ORCPT ); Wed, 4 Mar 2015 20:44:10 -0500 Message-ID: <1425519846.1637.5.camel@phoenix> Subject: [PATCH 2/2] phy: miphy28lp: Use PTR_ERR_OR_ZERO From: Axel Lin To: Kishon Vijay Abraham I Cc: Gabriel FERNANDEZ , "kernel@vger.kernel.org" , Alexandre Torgue Date: Thu, 05 Mar 2015 09:44:06 +0800 In-Reply-To: <1425519789.1637.4.camel@phoenix> References: <1425519789.1637.4.camel@phoenix> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PTR_ERR_OR_ZERO simplifies the code. Signed-off-by: Axel Lin --- drivers/phy/phy-miphy28lp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c index 9334352..c4cc11d 100644 --- a/drivers/phy/phy-miphy28lp.c +++ b/drivers/phy/phy-miphy28lp.c @@ -1259,10 +1259,7 @@ static int miphy28lp_probe(struct platform_device *pdev) } provider = devm_of_phy_provider_register(&pdev->dev, miphy28lp_xlate); - if (IS_ERR(provider)) - return PTR_ERR(provider); - - return 0; + return PTR_ERR_OR_ZERO(provider); } static const struct of_device_id miphy28lp_of_match[] = { -- 1.9.1