]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] lirc_zilog: Deletion of unnecessary checks before vfree()
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 1 Dec 2014 18:49:39 +0000 (15:49 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 4 Dec 2014 17:47:06 +0000 (15:47 -0200)
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>
drivers/staging/media/lirc/lirc_zilog.c

index 1ccf6262ab369d1be3cba7f3c1b996a8872852d7..1e15d2cab727bdce3f83f42691ff55e5170d14b2 100644 (file)
@@ -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;