summaryrefslogtreecommitdiff
path: root/drivers/misc/altera-stapl/altera.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/altera-stapl/altera.c')
-rw-r--r--drivers/misc/altera-stapl/altera.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/altera-stapl/altera.c b/drivers/misc/altera-stapl/altera.c
index f53e217e963f..494e263daa74 100644
--- a/drivers/misc/altera-stapl/altera.c
+++ b/drivers/misc/altera-stapl/altera.c
@@ -2176,8 +2176,7 @@ static int altera_get_note(u8 *p, s32 program_size,
key_ptr = &p[note_strings +
get_unaligned_be32(
&p[note_table + (8 * i)])];
- if ((strncasecmp(key, key_ptr, strlen(key_ptr)) == 0) &&
- (key != NULL)) {
+ if (key && !strncasecmp(key, key_ptr, strlen(key_ptr))) {
status = 0;
value_ptr = &p[note_strings +