Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752011AbdLNDFn convert rfc822-to-8bit (ORCPT ); Wed, 13 Dec 2017 22:05:43 -0500 Received: from smtp.csie.ntu.edu.tw ([140.112.30.61]:36268 "EHLO smtp.csie.ntu.edu.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbdLNDFl (ORCPT ); Wed, 13 Dec 2017 22:05:41 -0500 X-Google-Smtp-Source: ACJfBova6kNp8WXSAy0sYHVEAbE+wIyBVgp7ZNQCJbsM32IOYu+vSNo+JfGRR0DYEux0rhXP4EW7tx7Pggcfusb+HEw= MIME-Version: 1.0 In-Reply-To: <20171213102048.1c7e3b7f@dell-desktop.home> References: <20171213085503.31899-1-quentin.schulz@free-electrons.com> <20171213102048.1c7e3b7f@dell-desktop.home> From: Chen-Yu Tsai Date: Thu, 14 Dec 2017 11:05:13 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] pinctrl: axp209: dereference pointer after it's been set To: Mylene JOSSERAND Cc: Quentin Schulz , Linus Walleij , Chen-Yu Tsai , Maxime Ripard , "linux-gpio@vger.kernel.org" , linux-kernel , Thomas Petazzoni , linux-sunxi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 810 Lines: 21 On Wed, Dec 13, 2017 at 5:20 PM, Mylene JOSSERAND wrote: > Hello Quentin, > > Le Wed, 13 Dec 2017 09:55:03 +0100, > Quentin Schulz a écrit : > >> The number of GPIOs is gotten from a field within the structure >> referenced in the of_device.data but it was actually read before it was >> retrieved, thus it was dereferencing a null pointer. >> >> Set the number of GPIOs after retrieving of_device.data. >> >> Fixes: e1190083b89b ("pinctrl: axp209: add support for AXP813 GPIOs") >> >> Signed-off-by: Quentin Schulz >> Reported-by: Mylène Josserand > > Tested-by: Mylène Josserand Acked-by: Chen-Yu Tsai