aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/advansys.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:26 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:01 -0500
commitc9475cb0c358ff0dd473544280d92482df491913 (patch)
tree091617d0bdab9273d44139c86af21b7540e6d9b1 /drivers/scsi/advansys.c
parent089b1dbbde28f0f641c20beabba28fa89ab4fab9 (diff)
[PATCH] kfree cleanup: drivers/scsi
This is the drivers/scsi/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/scsi/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Acked-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/advansys.c')
-rw-r--r--drivers/scsi/advansys.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 37ec5411e325..f4cfb8f29620 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -5402,10 +5402,8 @@ advansys_detect(struct scsi_host_template *tpnt)
5402 release_region(shp->io_port, boardp->asc_n_io_port); 5402 release_region(shp->io_port, boardp->asc_n_io_port);
5403 if (ASC_WIDE_BOARD(boardp)) { 5403 if (ASC_WIDE_BOARD(boardp)) {
5404 iounmap(boardp->ioremap_addr); 5404 iounmap(boardp->ioremap_addr);
5405 if (boardp->orig_carrp) { 5405 kfree(boardp->orig_carrp);
5406 kfree(boardp->orig_carrp); 5406 boardp->orig_carrp = NULL;
5407 boardp->orig_carrp = NULL;
5408 }
5409 if (boardp->orig_reqp) { 5407 if (boardp->orig_reqp) {
5410 kfree(boardp->orig_reqp); 5408 kfree(boardp->orig_reqp);
5411 boardp->orig_reqp = boardp->adv_reqp = NULL; 5409 boardp->orig_reqp = boardp->adv_reqp = NULL;
@@ -5457,10 +5455,8 @@ advansys_release(struct Scsi_Host *shp)
5457 adv_sgblk_t *sgp = NULL; 5455 adv_sgblk_t *sgp = NULL;
5458 5456
5459 iounmap(boardp->ioremap_addr); 5457 iounmap(boardp->ioremap_addr);
5460 if (boardp->orig_carrp) { 5458 kfree(boardp->orig_carrp);
5461 kfree(boardp->orig_carrp); 5459 boardp->orig_carrp = NULL;
5462 boardp->orig_carrp = NULL;
5463 }
5464 if (boardp->orig_reqp) { 5460 if (boardp->orig_reqp) {
5465 kfree(boardp->orig_reqp); 5461 kfree(boardp->orig_reqp);
5466 boardp->orig_reqp = boardp->adv_reqp = NULL; 5462 boardp->orig_reqp = boardp->adv_reqp = NULL;