Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755281Ab2FTHwJ (ORCPT ); Wed, 20 Jun 2012 03:52:09 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:59390 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754168Ab2FTHwH (ORCPT ); Wed, 20 Jun 2012 03:52:07 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 20 Jun 2012 09:52:06 +0200 Message-ID: Subject: Re: Q: return of pinctrl_register and handing at drivers that use this function From: Linus Walleij To: "devendra.aaru" Cc: Stephen Warren , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 823 Lines: 25 On Mon, Jun 18, 2012 at 4:42 PM, devendra.aaru wrote: > On Mon, Jun 18, 2012 at 8:08 PM, Linus Walleij wrote: >> On Mon, Jun 18, 2012 at 2:04 PM, devendra.aaru wrote: >> >>> So checking the return value of pinctrl_register with IS_ERR is not required. >> >> Nope. > > You mean to say that the check "IS_ERR(ret_ptr)" is not required? or > the other way like its also needed. I mean it shall be tested like this: if (!pinmctrl_register(&foo)) { /* error case */ } No IS_ERR() business. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/