diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-04-30 12:53:11 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-10-04 04:19:51 -0400 |
commit | 5f0cc6d16c0572bf5e9e65b6133ac415268c0720 (patch) | |
tree | 2ae73652306c95eea1c7c328fff2452dd52201cd | |
parent | 9c7f4f5ce6523af6b6e103a991b2ca71b962acb7 (diff) |
ARM: pxa: Wunused-result warning in viper board file
Calling kstrtoul requires checking the result. In case of
the viper_tpm_setup function, let's fail the __setup function
if the number was invalid.
Without this patch, building viper_defconfig results in:
arch/arm/mach-pxa/viper.c: In function 'viper_tpm_setup':
arch/arm/mach-pxa/viper.c:771:10: warning: ignoring return value of 'kstrtoul', declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Marc Zyngier <maz@misterjones.org>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r-- | arch/arm/mach-pxa/viper.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 130379fb9d0f..ac733e91f3e4 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -768,8 +768,7 @@ static unsigned long viper_tpm; | |||
768 | 768 | ||
769 | static int __init viper_tpm_setup(char *str) | 769 | static int __init viper_tpm_setup(char *str) |
770 | { | 770 | { |
771 | strict_strtoul(str, 10, &viper_tpm); | 771 | return strict_strtoul(str, 10, &viper_tpm) >= 0; |
772 | return 1; | ||
773 | } | 772 | } |
774 | 773 | ||
775 | __setup("tpm=", viper_tpm_setup); | 774 | __setup("tpm=", viper_tpm_setup); |