Skip to content

Commit

Permalink
s390/monreader: Remove redundant NULL check before kfree
Browse files Browse the repository at this point in the history
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
syamsidhardh authored and Martin Schwidefsky committed Apr 17, 2013
1 parent 98ae9b0 commit a75a282
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/s390/char/monreader.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ static void mon_free_mem(struct mon_private *monpriv)
int i;

for (i = 0; i < MON_MSGLIM; i++)
if (monpriv->msg_array[i])
kfree(monpriv->msg_array[i]);
kfree(monpriv->msg_array[i]);
kfree(monpriv);
}

Expand Down

0 comments on commit a75a282

Please sign in to comment.