From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [PATCH v3 3/3] pinctrl: qcom: Don't allow protected pins to be requested Date: Thu, 22 Mar 2018 19:23:07 -0500 Message-ID: References: <20180321165848.89751-1-swboyd@chromium.org> <20180321165848.89751-4-swboyd@chromium.org> <97380342-c3aa-5d34-7b22-f6ebbab4bafe@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <97380342-c3aa-5d34-7b22-f6ebbab4bafe@codeaurora.org> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Stephen Boyd , Linus Walleij Cc: Stephen Boyd , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Bjorn Andersson , Grant Likely , linux-gpio@vger.kernel.org, Andy Shevchenko List-Id: linux-gpio@vger.kernel.org On 03/22/2018 07:16 PM, Timur Tabi wrote: > > This needs to be ret <= max_gpios, otherwise it will fail if every GPIO > is available. > > And it should print an error message and return an error code if ret > > max_gpios. Also, you don't allocate chip->valid_mask anywhere. -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.