Skip to content

Commit

Permalink
IB/srp: Remove redundant memset()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
  • Loading branch information
Ishai Rabinovitz authored and Roland Dreier committed Oct 10, 2006
1 parent e52e608 commit 9b0af40
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9b0af40

Please sign in to comment.