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)
commit9c17d08ca183b92c9cfab6537069914a5e0e7e81
treeda0aee25b520a6900fbcc3fd6fff2287c08adeef
parentb6e76f10afbdc510df9288ab4df3e94a89c20909
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