[PATCH] arm: ecard: Fix compilation warning.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marek Belisko
Date: Monday, December 6, 2010 - 7:04 am

Fix following compilation warning:
arch/arm/kernel/ecard.c:1066: warning: ignoring return value of
'device_register', declared with attribute warn_unused_result

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 arch/arm/kernel/ecard.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c
index eed2f79..da882b1 100644
--- a/arch/arm/kernel/ecard.c
+++ b/arch/arm/kernel/ecard.c
@@ -1063,8 +1063,10 @@ ecard_probe(int slot, 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;
 
  nodev:
-- 
1.7.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] arm: ecard: Fix compilation warning., Marek Belisko, (Mon Dec 6, 7:04 am)
Re: [PATCH] arm: ecard: Fix compilation warning., Russell King - ARM Linux, (Mon Dec 6, 7:05 am)
Re: [PATCH] arm: ecard: Fix compilation warning., Belisko Marek, (Mon Dec 6, 12:11 pm)