diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-02-07 12:03:23 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-02-13 11:00:39 +0100 |
commit | 70d669de7356f6476db454dd8d053cd9c674a0d5 (patch) | |
tree | d71e3018964cb80fb8a00dabdb8aa74b6814e69c /arch/arm/mach-omap2/board-zoom-peripherals.c | |
parent | ARM: omap: fix wrapped error messages in omap_hwmod.c (diff) | |
download | linux-70d669de7356f6476db454dd8d053cd9c674a0d5.tar.xz linux-70d669de7356f6476db454dd8d053cd9c674a0d5.zip |
ARM: omap: resolve nebulous 'Error setting wl12xx data'
It's useful to print the error code when a called function fails so a
diagnosis of why it failed is possible. In this case, it fails because
we try to register some data for the wl12xx driver, but as the driver
is not configured, a stub function is used which simply returns -ENOSYS.
Let's do the simple thing for -rc and print the error code.
Also, the return code from platform_register_device() at each of these
sites was not being checked. Add some checking, and again print the
error code.
This should be fixed properly for the next merge window so we don't
issue error messages merely because a driver is not configured.
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to '')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-peripherals.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 8d7ce11cfeaf..c126461836ac 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c @@ -296,8 +296,10 @@ static void enable_board_wakeup_source(void) void __init zoom_peripherals_init(void) { - if (wl12xx_set_platform_data(&omap_zoom_wlan_data)) - pr_err("error setting wl12xx data\n"); + int ret = wl12xx_set_platform_data(&omap_zoom_wlan_data); + + if (ret) + pr_err("error setting wl12xx data: %d\n", ret); omap_i2c_init(); platform_device_register(&omap_vwlan_device); |