diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-05-31 06:14:26 +0200 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-31 06:14:26 +0200 |
commit | d5b732b17ca2fc74f370bdba5aae6c804fac8c35 (patch) | |
tree | 4facc6d96116b032a3c1cb2ced9b2a3008e9216e /drivers/char/hvsi.c | |
parent | ARM: mach-shmobile: SH7372 has 6 SCIFA and 1 SCIFB ports (diff) | |
parent | Linux 2.6.35-rc1 (diff) | |
download | linux-d5b732b17ca2fc74f370bdba5aae6c804fac8c35.tar.xz linux-d5b732b17ca2fc74f370bdba5aae6c804fac8c35.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/char/hvsi.c')
-rw-r--r-- | drivers/char/hvsi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index 793b236c9266..d4b14ff1c4c1 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c @@ -194,10 +194,8 @@ static inline void print_state(struct hvsi_struct *hp) "HVSI_WAIT_FOR_MCTRL_RESPONSE", "HVSI_FSP_DIED", }; - const char *name = state_names[hp->state]; - - if (hp->state > ARRAY_SIZE(state_names)) - name = "UNKNOWN"; + const char *name = (hp->state < ARRAY_SIZE(state_names)) + ? state_names[hp->state] : "UNKNOWN"; pr_debug("hvsi%i: state = %s\n", hp->index, name); #endif /* DEBUG */ |