Commit 4dd53810 authored by Ilia Mirkin's avatar Ilia Mirkin Committed by Greg Kroah-Hartman

staging: ath6kl: Remove NULL check before kfree

This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);

@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>
Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Acked-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 459d2ea0
...@@ -1214,9 +1214,7 @@ delHifDevice(HIF_DEVICE * device) ...@@ -1214,9 +1214,7 @@ delHifDevice(HIF_DEVICE * device)
{ {
AR_DEBUG_ASSERT(device!= NULL); AR_DEBUG_ASSERT(device!= NULL);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: delHifDevice; 0x%p\n", device)); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: delHifDevice; 0x%p\n", device));
if (device->dma_buffer != NULL) { kfree(device->dma_buffer);
kfree(device->dma_buffer);
}
kfree(device); kfree(device);
} }
......
...@@ -120,9 +120,7 @@ int logger_write(const enum logidx index, ...@@ -120,9 +120,7 @@ int logger_write(const enum logidx index,
} }
set_fs(oldfs); set_fs(oldfs);
out_free_message: out_free_message:
if (msg) { kfree(msg);
kfree(msg);
}
return ret; return ret;
} }
#endif #endif
......
...@@ -260,10 +260,8 @@ static void bt_cleanup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo) ...@@ -260,10 +260,8 @@ static void bt_cleanup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
} }
} }
if (pHciPalInfo->hdev != NULL) { kfree(pHciPalInfo->hdev);
kfree(pHciPalInfo->hdev); pHciPalInfo->hdev = NULL;
pHciPalInfo->hdev = NULL;
}
} }
/********************************************************* /*********************************************************
......
...@@ -929,10 +929,8 @@ static void bt_cleanup_hci(struct ar6k_hci_bridge_info *pHcidevInfo) ...@@ -929,10 +929,8 @@ static void bt_cleanup_hci(struct ar6k_hci_bridge_info *pHcidevInfo)
} }
} }
if (pHcidevInfo->pBtStackHCIDev != NULL) { kfree(pHcidevInfo->pBtStackHCIDev);
kfree(pHcidevInfo->pBtStackHCIDev); pHcidevInfo->pBtStackHCIDev = NULL;
pHcidevInfo->pBtStackHCIDev = NULL;
}
} }
static int bt_register_hci(struct ar6k_hci_bridge_info *pHcidevInfo) static int bt_register_hci(struct ar6k_hci_bridge_info *pHcidevInfo)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment