From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753442AbbDNCAs (ORCPT ); Mon, 13 Apr 2015 22:00:48 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:4183 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751455AbbDNCAj (ORCPT ); Mon, 13 Apr 2015 22:00:39 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Mon, 13 Apr 2015 19:00:08 -0700 Message-ID: <552C74C0.90000@nvidia.com> Date: Tue, 14 Apr 2015 11:00:32 +0900 From: Alexandre Courbot Organization: NVIDIA User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Javier Martinez Canillas , Ulf Hansson CC: Marek Szyprowski , Olof Johansson , Doug Anderson , Kevin Hilman , , , Subject: Re: [PATCH 1/1] mmc: pwrseq: Fix error code propagation in mmc_pwrseq_simple_alloc() References: <1428934061-29217-1-git-send-email-javier.martinez@collabora.co.uk> In-Reply-To: <1428934061-29217-1-git-send-email-javier.martinez@collabora.co.uk> X-NVConfidentiality: public X-Originating-IP: [10.19.57.128] X-ClientProxiedBy: HKMAIL103.nvidia.com (10.18.16.12) To HKMAIL103.nvidia.com (10.18.16.12) Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/13/2015 11:07 PM, Javier Martinez Canillas wrote: > If the struct mmc_pwrseq_match .alloc function used to allocate a > struct mmc_pwrseq fails, the error is propagated to mmc_of_parse(). > > But instead of returning the error code in pwrseq, host->pwrseq is > returned which will always be 0. So mmc_of_parse() succeeds even if > the pwrseq .alloc function failed and host->pwrseq is NULL. > > This makes the SDIO device to not be powered if the power sequencing > .alloc functions wants to be deferred due a missing resource because > the mmc controller driver probe did wrongly succeed. > > Fixes: 0f12a0ce4ce4a ("mmc: pwrseq: simplify alloc/free hooks") > Signed-off-by: Javier Martinez Canillas I obviously overlooked that one. Thanks for fixing it. Reviewed-by: Alexandre Courbot From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Courbot Subject: Re: [PATCH 1/1] mmc: pwrseq: Fix error code propagation in mmc_pwrseq_simple_alloc() Date: Tue, 14 Apr 2015 11:00:32 +0900 Message-ID: <552C74C0.90000@nvidia.com> References: <1428934061-29217-1-git-send-email-javier.martinez@collabora.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1428934061-29217-1-git-send-email-javier.martinez@collabora.co.uk> Sender: linux-samsung-soc-owner@vger.kernel.org To: Javier Martinez Canillas , Ulf Hansson Cc: Marek Szyprowski , Olof Johansson , Doug Anderson , Kevin Hilman , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org List-Id: linux-mmc@vger.kernel.org On 04/13/2015 11:07 PM, Javier Martinez Canillas wrote: > If the struct mmc_pwrseq_match .alloc function used to allocate a > struct mmc_pwrseq fails, the error is propagated to mmc_of_parse(). > > But instead of returning the error code in pwrseq, host->pwrseq is > returned which will always be 0. So mmc_of_parse() succeeds even if > the pwrseq .alloc function failed and host->pwrseq is NULL. > > This makes the SDIO device to not be powered if the power sequencing > .alloc functions wants to be deferred due a missing resource because > the mmc controller driver probe did wrongly succeed. > > Fixes: 0f12a0ce4ce4a ("mmc: pwrseq: simplify alloc/free hooks") > Signed-off-by: Javier Martinez Canillas I obviously overlooked that one. Thanks for fixing it. Reviewed-by: Alexandre Courbot