From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752143Ab2GUXXt (ORCPT ); Sat, 21 Jul 2012 19:23:49 -0400 Received: from void.printf.net ([89.145.121.20]:41832 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680Ab2GUXXs (ORCPT ); Sat, 21 Jul 2012 19:23:48 -0400 From: Chris Ball To: "S\, Venkatraman" Cc: Kevin Hilman , linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, Balaji T K , Rajendra Nayak , Adrian Hunter , open list Subject: Re: [PATCH] mmc: omap_hsmmc: ensure probe returns error upon resource failure References: <1341963658-20896-1-git-send-email-khilman@ti.com> Date: Sat, 21 Jul 2012 19:23:35 -0400 In-Reply-To: (Venkatraman S.'s message of "Thu, 12 Jul 2012 11:49:13 +0530") Message-ID: <87k3xw3dhk.fsf@octavius.laptop.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Jul 12 2012, S, Venkatraman wrote: > On Wed, Jul 11, 2012 at 5:10 AM, Kevin Hilman wrote: >> If platform_get_resource_by_name() fails, driver probe is aborted an >> should return an error so the driver is not bound to the device. >> >> However, in the current error path of platform_get_resource_by_name(), >> probe returns zero since the return value (ret) is not properly set. >> With a zero return value, the driver core assumes probe was successful >> and will bind the driver to the device. >> >> Fix this by ensuring that probe returns an error code in this failure >> path. >> >> Signed-off-by: Kevin Hilman > > Good catch. > Acked-by: Venkatraman S Thanks, pushed to mmc-next for 3.6. - Chris. -- Chris Ball One Laptop Per Child