Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=41ead3c918f48710ca1e03eb7b770eabcbbd260b
Commit:     41ead3c918f48710ca1e03eb7b770eabcbbd260b
Parent:     cc60d8baa35c995bf8c40a9730b894993ddb43b9
Author:     Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 1 23:46:45 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Wed Aug 1 23:46:45 2007 +0200

    drivers/scsi/ide-scsi.c: kmalloc + memset conversion to kzalloc
    
     drivers/scsi/ide-scsi.c | 34642 -> 34536 (-106 bytes)
     drivers/scsi/ide-scsi.o | 171728 -> 171524 (-204 bytes)
    
    Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/scsi/ide-scsi.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index bb90df8..1cc01ac 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -328,17 +328,15 @@ static int idescsi_check_condition(ide_drive_t *drive, 
struct request *failed_co
        u8             *buf;
 
        /* stuff a sense request in front of our current request */
-       pc = kmalloc (sizeof (idescsi_pc_t), GFP_ATOMIC);
-       rq = kmalloc (sizeof (struct request), GFP_ATOMIC);
-       buf = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC);
-       if (pc == NULL || rq == NULL || buf == NULL) {
+       pc = kzalloc(sizeof(idescsi_pc_t), GFP_ATOMIC);
+       rq = kmalloc(sizeof(struct request), GFP_ATOMIC);
+       buf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC);
+       if (!pc || !rq || !buf) {
                kfree(buf);
                kfree(rq);
                kfree(pc);
                return -ENOMEM;
        }
-       memset (pc, 0, sizeof (idescsi_pc_t));
-       memset (buf, 0, SCSI_SENSE_BUFFERSIZE);
        ide_init_drive_cmd(rq);
        rq->special = (char *) pc;
        pc->rq = rq;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to