[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>
This commit is contained in:

committed by
Linus Torvalds

parent
089b1dbbde
commit
c9475cb0c3
@@ -5402,10 +5402,8 @@ advansys_detect(struct scsi_host_template *tpnt)
|
||||
release_region(shp->io_port, boardp->asc_n_io_port);
|
||||
if (ASC_WIDE_BOARD(boardp)) {
|
||||
iounmap(boardp->ioremap_addr);
|
||||
if (boardp->orig_carrp) {
|
||||
kfree(boardp->orig_carrp);
|
||||
boardp->orig_carrp = NULL;
|
||||
}
|
||||
kfree(boardp->orig_carrp);
|
||||
boardp->orig_carrp = NULL;
|
||||
if (boardp->orig_reqp) {
|
||||
kfree(boardp->orig_reqp);
|
||||
boardp->orig_reqp = boardp->adv_reqp = NULL;
|
||||
@@ -5457,10 +5455,8 @@ advansys_release(struct Scsi_Host *shp)
|
||||
adv_sgblk_t *sgp = NULL;
|
||||
|
||||
iounmap(boardp->ioremap_addr);
|
||||
if (boardp->orig_carrp) {
|
||||
kfree(boardp->orig_carrp);
|
||||
boardp->orig_carrp = NULL;
|
||||
}
|
||||
kfree(boardp->orig_carrp);
|
||||
boardp->orig_carrp = NULL;
|
||||
if (boardp->orig_reqp) {
|
||||
kfree(boardp->orig_reqp);
|
||||
boardp->orig_reqp = boardp->adv_reqp = NULL;
|
||||
|
Reference in New Issue
Block a user