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>
This commit is contained in:
Alexander Beregalov 2011-03-26 20:18:13 +03:00 committed by Greg Kroah-Hartman
parent 389fe985f2
commit cc614b6970
1 changed files with 3 additions and 9 deletions

View File

@ -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;
}