Skip to content

Commit

Permalink
mISDN: Deletion of unnecessary checks before the function call "vfree"
Browse files Browse the repository at this point in the history
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Markus Elfring authored and David S. Miller committed Nov 21, 2014
1 parent 675a53b commit 3819ffd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/isdn/mISDN/l1oip_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,8 @@ l1oip_ulaw_to_alaw(u8 *data, int len, u8 *result)
void
l1oip_4bit_free(void)
{
if (table_dec)
vfree(table_dec);
if (table_com)
vfree(table_com);
vfree(table_dec);
vfree(table_com);
table_com = NULL;
table_dec = NULL;
}
Expand Down

0 comments on commit 3819ffd

Please sign in to comment.