]> err.no Git - linux-2.6/commitdiff
IB/srp: Remove redundant memset()
authorIshai Rabinovitz <ishai@mellanox.co.il>
Tue, 10 Oct 2006 16:51:14 +0000 (09:51 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 10 Oct 2006 16:51:14 +0000 (09:51 -0700)
scsi_host_alloc() already allocates with kzalloc(), so the struct Scsi_Host
is zeroed out, including the private data portion.  Remove the redundant
memset that zeros this out again in the SRP initiator.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/srp/ib_srp.c

index 44b9e5be6687941757e62ac0a7fd9be231dcda68..f1b7a0f2beedc4d616231ed83aad356c9e466f7a 100644 (file)
@@ -1708,7 +1708,6 @@ static ssize_t srp_create_target(struct class_device *class_dev,
        target_host->max_lun = SRP_MAX_LUN;
 
        target = host_to_target(target_host);
-       memset(target, 0, sizeof *target);
 
        target->io_class   = SRP_REV16A_IB_IO_CLASS;
        target->scsi_host  = target_host;