From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759858Ab3BZT1T (ORCPT ); Tue, 26 Feb 2013 14:27:19 -0500 Received: from mail-wi0-f170.google.com ([209.85.212.170]:43671 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755608Ab3BZT1S (ORCPT ); Tue, 26 Feb 2013 14:27:18 -0500 From: Grant Likely Subject: Re: [PATCH 1/4] gpiolib: check descriptors validity before use To: Alexandre Courbot Cc: Linus Walleij , Ryan Mallon , linux-kernel@vger.kernel.org, gnurou@gmail.com, Alexandre Courbot In-Reply-To: <1360907177-6468-2-git-send-email-acourbot@nvidia.com> References: <1360907177-6468-1-git-send-email-acourbot@nvidia.com> <1360907177-6468-2-git-send-email-acourbot@nvidia.com> Date: Tue, 26 Feb 2013 17:48:39 +0000 Message-Id: <20130226174839.714853E0AEF@localhost> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Feb 2013 14:46:14 +0900, Alexandre Courbot wrote: > Some functions dereferenced their GPIO descriptor argument without > checking its validity first, potentially leading to an oops when given > an invalid argument. > > This patch also makes gpio_get_value() more resilient when given an > invalid GPIO, returning 0 instead of silently crashing. > > Signed-off-by: Alexandre Courbot > Cc: Ryan Mallon Applied, thanks. g.