]> 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)
commita7c9886e55c75eb6df52e4e38c7e256fd659d5b9
treeda0aee25b520a6900fbcc3fd6fff2287c08adeef
parent7a4707016c0bb1870800ef435b0fb8a817712d3b
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