summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-rpc
diff options
context:
space:
mode:
authorArnd Bergmann2012-04-30 18:26:01 +0200
committerArnd Bergmann2012-10-07 10:33:09 +0200
commit5f07809e93b4c05516d85a3f2770b1a77115eb70 (patch)
treee64dc5192285bd085ce05d371ca913ba4b69bedc /arch/arm/mach-rpc
parentARM: davinci: don't mark da850_register_cpufreq as __init (diff)
downloadkernel-qcow2-linux-5f07809e93b4c05516d85a3f2770b1a77115eb70.tar.gz
kernel-qcow2-linux-5f07809e93b4c05516d85a3f2770b1a77115eb70.tar.xz
kernel-qcow2-linux-5f07809e93b4c05516d85a3f2770b1a77115eb70.zip
ARM: rpc: check device_register return code in ecard_probe
device_register is marked __must_check, so we better propagate the error value by returning it from ecard_probe. Without this patch, building rpc_defconfig results in: arch/arm/mach-rpc/ecard.c: In function 'ecard_probe': arch/arm/mach-rpc/ecard.c:963:17: warning: ignoring return value of 'device_register', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-rpc')
-rw-r--r--arch/arm/mach-rpc/ecard.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
index b91bc87b3dcf..fcb1d59f7aec 100644
--- a/arch/arm/mach-rpc/ecard.c
+++ b/arch/arm/mach-rpc/ecard.c
@@ -960,7 +960,9 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
*ecp = ec;
slot_to_expcard[slot] = ec;
- device_register(&ec->dev);
+ rc = device_register(&ec->dev);
+ if (rc)
+ goto nodev;
return 0;