You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
staging: wlan-ng: 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: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4d527a7adb
commit
a6f9c48fdd
@@ -612,10 +612,8 @@ void hfa384x_destroy(hfa384x_t *hw)
|
||||
hfa384x_drvr_stop(hw);
|
||||
hw->state = HFA384x_STATE_PREINIT;
|
||||
|
||||
if (hw->scanresults) {
|
||||
kfree(hw->scanresults);
|
||||
hw->scanresults = NULL;
|
||||
}
|
||||
kfree(hw->scanresults);
|
||||
hw->scanresults = NULL;
|
||||
|
||||
/* Now to clean out the auth queue */
|
||||
while ((skb = skb_dequeue(&hw->authq)))
|
||||
|
||||
@@ -443,8 +443,7 @@ void free_chunks(struct imgchunk *fchunk, unsigned int *nfchunks)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < *nfchunks; i++) {
|
||||
if (fchunk[i].data != NULL)
|
||||
kfree(fchunk[i].data);
|
||||
kfree(fchunk[i].data);
|
||||
}
|
||||
*nfchunks = 0;
|
||||
memset(fchunk, 0, sizeof(*fchunk));
|
||||
|
||||
Reference in New Issue
Block a user