Skip to content

Commit

Permalink
staging: rtl8712: Remove NULL check before kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ilia Mirkin authored and Greg Kroah-Hartman committed Mar 14, 2011
1 parent e72714f commit b7977fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/rtl8712/rtl871x_ioctl_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1873,8 +1873,7 @@ static int r871x_mp_ioctl_hdl(struct net_device *dev,
goto _r871x_mp_ioctl_hdl_exit;
}
_r871x_mp_ioctl_hdl_exit:
if (pparmbuf != NULL)
kfree(pparmbuf);
kfree(pparmbuf);
return ret;
}

Expand Down

0 comments on commit b7977fa

Please sign in to comment.