Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f07809e authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
parent 5063557a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;