Skip to content

Commit

Permalink
[media] lirc_zilog: Deletion of unnecessary checks before 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: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Markus Elfring authored and Mauro Carvalho Chehab committed Dec 4, 2014
1 parent 9a4ea5a commit e8379ec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/staging/media/lirc/lirc_zilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,11 +730,9 @@ static int send_boot_data(struct IR_tx *tx)
static void fw_unload_locked(void)
{
if (tx_data) {
if (tx_data->code_sets)
vfree(tx_data->code_sets);
vfree(tx_data->code_sets);

if (tx_data->datap)
vfree(tx_data->datap);
vfree(tx_data->datap);

vfree(tx_data);
tx_data = NULL;
Expand Down

0 comments on commit e8379ec

Please sign in to comment.