From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756509AbbFRQle (ORCPT ); Thu, 18 Jun 2015 12:41:34 -0400 Received: from down.free-electrons.com ([37.187.137.238]:44902 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754434AbbFRQlR (ORCPT ); Thu, 18 Jun 2015 12:41:17 -0400 Date: Thu, 18 Jun 2015 18:41:14 +0200 From: Alexandre Belloni To: Nicholas Krause Cc: balbi@ti.com, gregkh@linuxfoundation.org, nicolas.ferre@atmel.com, boris.brezillon@free-electrons.com, peter.chen@freescale.com, ronald.wahl@raritan.com, voice.shen@atmel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb:gadget:Simplify the error checking of the function,at91sam9261_udc_init Message-ID: <20150618164114.GS27492@piout.net> References: <1430709902-10815-1-git-send-email-xerofoify@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430709902-10815-1-git-send-email-xerofoify@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/05/2015 at 23:25:02 -0400, Nicholas Krause wrote : > This simplifies the error checking of the function,at91sam9261_udc_init > by using PTR_ERR_OR_ZERO in the return statement rather then a unnessary > if statement to check the return value of a call to the function, > syscon_regmap_lookup_by_phandle by checking with a call to the function, > IS_ERR and returning a error pointer if there is one for the function, > at91sam9261_udc_init. Furthermore this was found by running coccinelle > against the lastest kernel tree. > > Signed-off-by: Nicholas Krause Acked-by: Alexandre Belloni -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com