diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2011-03-13 00:29:11 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 11:57:36 -0700 |
commit | 9f7ff701ad7b7bdcab949aa0527fe7efb3882afa (patch) | |
tree | 81e1012bc8e90f3ce172fe89ae86ee41d676ae36 /drivers/staging/tidspbridge | |
parent | 39dd3e5d7b09b5a5010ed1aef512f2d58b65cb99 (diff) | |
download | blackbird-obmc-linux-9f7ff701ad7b7bdcab949aa0527fe7efb3882afa.tar.gz blackbird-obmc-linux-9f7ff701ad7b7bdcab949aa0527fe7efb3882afa.zip |
staging: tidspbridge: 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>
Diffstat (limited to 'drivers/staging/tidspbridge')
-rw-r--r-- | drivers/staging/tidspbridge/core/chnl_sm.c | 3 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/dbll.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c index 3c05d7cb9c94..8381130e1460 100644 --- a/drivers/staging/tidspbridge/core/chnl_sm.c +++ b/drivers/staging/tidspbridge/core/chnl_sm.c @@ -828,8 +828,7 @@ out_err: free_chirp_list(&pchnl->io_requests); free_chirp_list(&pchnl->free_packets_list); - if (sync_event) - kfree(sync_event); + kfree(sync_event); if (pchnl->ntfy_obj) { ntfy_delete(pchnl->ntfy_obj); diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c index 2e20f78e2c31..31da62b14bc9 100644 --- a/drivers/staging/tidspbridge/pmgr/dbll.c +++ b/drivers/staging/tidspbridge/pmgr/dbll.c @@ -272,8 +272,7 @@ void dbll_delete(struct dbll_tar_obj *target) DBC_REQUIRE(refs > 0); DBC_REQUIRE(zl_target); - if (zl_target != NULL) - kfree(zl_target); + kfree(zl_target); } |