diff options
author | Jes Sorensen <jes@sgi.com> | 2006-01-16 10:31:18 -0500 |
---|---|---|
committer | <jejb@mulgrave.il.steeleye.com> | 2006-02-27 23:55:02 -0500 |
commit | 24669f75a3231fa37444977c92d1f4838bec1233 (patch) | |
tree | 3b64076b7d031aa31b95caeb512fb7e68b5fd28f /drivers/scsi/scsi_lib.c | |
parent | b9a33cebac70d6f67a769ce8d4078fee2b254ada (diff) |
[SCSI] SCSI core kmalloc2kzalloc
Change the core SCSI code to use kzalloc rather than kmalloc+memset
where possible.
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 4362dcde74af..1fe4fd83e305 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -286,13 +286,12 @@ int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, | |||
286 | int result; | 286 | int result; |
287 | 287 | ||
288 | if (sshdr) { | 288 | if (sshdr) { |
289 | sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_NOIO); | 289 | sense = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_NOIO); |
290 | if (!sense) | 290 | if (!sense) |
291 | return DRIVER_ERROR << 24; | 291 | return DRIVER_ERROR << 24; |
292 | memset(sense, 0, SCSI_SENSE_BUFFERSIZE); | ||
293 | } | 292 | } |
294 | result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen, | 293 | result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen, |
295 | sense, timeout, retries, 0); | 294 | sense, timeout, retries, 0); |
296 | if (sshdr) | 295 | if (sshdr) |
297 | scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, sshdr); | 296 | scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, sshdr); |
298 | 297 | ||