diff options
author | Guenter Roeck <[email protected]> | 2014-10-10 17:41:17 -0700 |
---|---|---|
committer | Sebastian Reichel <[email protected]> | 2015-01-21 20:06:44 +0100 |
commit | a538cf04ef67861a208075a6d57d0f045822e1d6 (patch) | |
tree | d8791e4397f87ce520c04f71d15640dc0be34387 /scripts/gcc-plugins/randomize_layout_plugin.c | |
parent | 90f04a28fbadbc179ee6325fd4ee7d5beb27bcf0 (diff) |
power/reset: at91-poweroff: Fix error handling and other compiler warnings
at91_poweroff_get_wakeup_mode can return a negative error code and should
therefore not return an enum type. Similar, its result should not be
assigned to an enum type. Otherwise, the returned value is never negative,
resulting in a compiler warning and a missed error condition, which in turn
results in writing bad values into a chip register.
Also fix other compiler warnings which can be easily avoided.
drivers/power/reset/at91-poweroff.c:74:24:
warning: type qualifiers ignored on function return type
drivers/power/reset/at91-poweroff.c:74:24:
warning: no previous prototype for 'at91_poweroff_get_wakeup_mode'
drivers/power/reset/at91-poweroff.c:83:16:
warning: comparison between signed and unsigned integer expressions
drivers/power/reset/at91-poweroff.c:97:2:
warning: comparison of unsigned expression < 0 is always false
Cc: Maxime Ripard <[email protected]>
Cc: Nicolas Ferre <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions