lkml.org 
[lkml]   [2012]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mmc: omap_hsmmc: ensure probe returns error upon resource failure
Date
Hi,

On Thu, Jul 12 2012, S, Venkatraman wrote:
> On Wed, Jul 11, 2012 at 5:10 AM, Kevin Hilman <khilman@ti.com> 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 <khilman@ti.com>
>
> Good catch.
> Acked-by: Venkatraman S <svenkatr@ti.com>

Thanks, pushed to mmc-next for 3.6.

- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child


\
 
 \ /
  Last update: 2012-07-22 01:41    [W:0.047 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site