From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grygorii Strashko Subject: Re: [PATCH v2] gpio: make library immune to error pointers Date: Thu, 16 Jun 2016 16:05:47 +0300 Message-ID: <5762A42B.6000502@ti.com> References: <1466076157-9805-1-git-send-email-linus.walleij@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1466076157-9805-1-git-send-email-linus.walleij@linaro.org> Sender: stable-owner@vger.kernel.org To: Linus Walleij , linux-gpio@vger.kernel.org, Alexandre Courbot Cc: stable@vger.kernel.org List-Id: linux-gpio@vger.kernel.org On 06/16/2016 02:22 PM, Linus Walleij wrote: > Most functions that take a GPIO descriptor in need to check the > descriptor for IS_ERR(). We do this mostly in the VALIDATE_DESC() > macro except for the gpiod_to_irq() function which needs special > handling. > > Cc: stable@vger.kernel.org > Reported-by: Grygorii Strashko > Signed-off-by: Linus Walleij > --- > ChangeLog v1->v2: > - Complain when descriptors contain error values so the offending > code can be fixed. > --- Reviewed-by: Grygorii Strashko -- regards, -grygorii From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from comal.ext.ti.com ([198.47.26.152]:48950 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753904AbcFPNFx (ORCPT ); Thu, 16 Jun 2016 09:05:53 -0400 Subject: Re: [PATCH v2] gpio: make library immune to error pointers To: Linus Walleij , , Alexandre Courbot References: <1466076157-9805-1-git-send-email-linus.walleij@linaro.org> CC: From: Grygorii Strashko Message-ID: <5762A42B.6000502@ti.com> Date: Thu, 16 Jun 2016 16:05:47 +0300 MIME-Version: 1.0 In-Reply-To: <1466076157-9805-1-git-send-email-linus.walleij@linaro.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On 06/16/2016 02:22 PM, Linus Walleij wrote: > Most functions that take a GPIO descriptor in need to check the > descriptor for IS_ERR(). We do this mostly in the VALIDATE_DESC() > macro except for the gpiod_to_irq() function which needs special > handling. > > Cc: stable@vger.kernel.org > Reported-by: Grygorii Strashko > Signed-off-by: Linus Walleij > --- > ChangeLog v1->v2: > - Complain when descriptors contain error values so the offending > code can be fixed. > --- Reviewed-by: Grygorii Strashko -- regards, -grygorii