aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-12-01 13:49:39 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-12-04 12:47:06 -0500
commite8379ecff31c0a172cb2ccc7cf28c24b45f144cf (patch)
tree8a0463c29e874e94b8f1882a4b3996963ed7120c
parent9a4ea5a98652f602d4ec16957f64fd666e862b09 (diff)
[media] lirc_zilog: Deletion of unnecessary checks before vfree()
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>
-rw-r--r--drivers/staging/media/lirc/lirc_zilog.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c
index 1ccf6262ab36..1e15d2cab727 100644
--- a/drivers/staging/media/lirc/lirc_zilog.c
+++ b/drivers/staging/media/lirc/lirc_zilog.c
@@ -730,11 +730,9 @@ static int send_boot_data(struct IR_tx *tx)
730static void fw_unload_locked(void) 730static void fw_unload_locked(void)
731{ 731{
732 if (tx_data) { 732 if (tx_data) {
733 if (tx_data->code_sets) 733 vfree(tx_data->code_sets);
734 vfree(tx_data->code_sets);
735 734
736 if (tx_data->datap) 735 vfree(tx_data->datap);
737 vfree(tx_data->datap);
738 736
739 vfree(tx_data); 737 vfree(tx_data);
740 tx_data = NULL; 738 tx_data = NULL;