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: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
{
AR_DEBUG_ASSERT(device!= NULL);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: delHifDevice; 0x%p\n", device));
{
AR_DEBUG_ASSERT(device!= NULL);
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);
}
set_fs(oldfs);
out_free_message:
}
set_fs(oldfs);
out_free_message:
- if (msg) {
- kfree(msg);
- }
- if (pHciPalInfo->hdev != NULL) {
- kfree(pHciPalInfo->hdev);
- pHciPalInfo->hdev = NULL;
- }
+ kfree(pHciPalInfo->hdev);
+ pHciPalInfo->hdev = NULL;
}
/*********************************************************
}
/*********************************************************
- if (pHcidevInfo->pBtStackHCIDev != NULL) {
- kfree(pHcidevInfo->pBtStackHCIDev);
- pHcidevInfo->pBtStackHCIDev = NULL;
- }
+ kfree(pHcidevInfo->pBtStackHCIDev);
+ 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)