]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: omap_hsmmc: ensure probe returns error upon resource failure
authorKevin Hilman <khilman@ti.com>
Tue, 10 Jul 2012 23:40:56 +0000 (16:40 -0700)
committerChris Ball <cjb@laptop.org>
Sun, 22 Jul 2012 20:42:47 +0000 (16:42 -0400)
commite15ca56accf1a5e53e676779eed22c98a2302127
treeda0aee25b520a6900fbcc3fd6fff2287c08adeef
parent205543d68b00a1e44e62c96d0530722ce06fd951
mmc: omap_hsmmc: ensure probe returns error upon resource failure

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>
Acked-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/omap_hsmmc.c