summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Beregalov2011-03-26 18:18:13 +0100
committerGreg Kroah-Hartman2011-04-20 22:45:58 +0200
commitcc614b6970ed9957d51255682c2784c2310623af (patch)
treee08e6f3bf6081d49f5041f7ce73ed53e8035717c
parentStaging: rts_pstor: s/rtsx_alloc_dma_buf/kmalloc/ (diff)
downloadkernel-qcow2-linux-cc614b6970ed9957d51255682c2784c2310623af.tar.gz
kernel-qcow2-linux-cc614b6970ed9957d51255682c2784c2310623af.tar.xz
kernel-qcow2-linux-cc614b6970ed9957d51255682c2784c2310623af.zip
Staging: rts_pstor: redundant null check before kfree()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/rts_pstor/ms.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/staging/rts_pstor/ms.c b/drivers/staging/rts_pstor/ms.c
index 9975a59e52a3..2fd2932432f5 100644
--- a/drivers/staging/rts_pstor/ms.c
+++ b/drivers/staging/rts_pstor/ms.c
@@ -3816,9 +3816,7 @@ int mg_get_local_EKB(struct scsi_cmnd *srb, struct rtsx_chip *chip)
rtsx_stor_set_xfer_buf(buf, bufflen, srb);
GetEKBFinish:
- if (buf) {
- kfree(buf);
- }
+ kfree(buf);
return retval;
}
@@ -4054,9 +4052,7 @@ int mg_get_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip)
rtsx_stor_set_xfer_buf(buf, bufflen, srb);
GetICVFinish:
- if (buf) {
- kfree(buf);
- }
+ kfree(buf);
return retval;
}
@@ -4155,9 +4151,7 @@ int mg_set_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip)
#endif
SetICVFinish:
- if (buf) {
- kfree(buf);
- }
+ kfree(buf);
return retval;
}