diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 01:01:30 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 07:54:03 -0800 |
commit | 17fd682e544556a2a829e94383239c029bb21c5e (patch) | |
tree | 4b78bdd36efdbf9fb2c4c11382ed88898ceec48c /drivers/s390/char/tape_core.c | |
parent | 3c7208f253571ee5f157b98f0e315b5172afe092 (diff) | |
download | linux-17fd682e544556a2a829e94383239c029bb21c5e.tar.bz2 |
[PATCH] kfree cleanup: drivers/s390
This is the drivers/s390/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in drivers/s390/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Cornelia Huck <cohuck@de.ibm.com>
Acked-by: Stefan Bader <Stefan.Bader@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/char/tape_core.c')
-rw-r--r-- | drivers/s390/char/tape_core.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 6c52e8307dc5..8f486e1a8507 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c @@ -682,8 +682,7 @@ tape_alloc_request(int cplength, int datasize) request->cpdata = kmalloc(datasize, GFP_KERNEL | GFP_DMA); if (request->cpdata == NULL) { DBF_EXCEPTION(1, "cqra nomem\n"); - if (request->cpaddr != NULL) - kfree(request->cpaddr); + kfree(request->cpaddr); kfree(request); return ERR_PTR(-ENOMEM); } @@ -706,10 +705,8 @@ tape_free_request (struct tape_request * request) if (request->device != NULL) { request->device = tape_put_device(request->device); } - if (request->cpdata != NULL) - kfree(request->cpdata); - if (request->cpaddr != NULL) - kfree(request->cpaddr); + kfree(request->cpdata); + kfree(request->cpaddr); kfree(request); } |