mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
ib_srpt: Suppress a checkpath complaint
Avoid that checkpatch reports the following: WARNING: Possible unnecessary 'out of memory' message git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6106 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3693,24 +3693,20 @@ static int srpt_get_initiator_port_transport_id(struct scst_tgt *tgt,
|
||||
uint8_t i_port_id[16];
|
||||
};
|
||||
struct spc_rdma_transport_id *tr_id;
|
||||
int res;
|
||||
int res = SCSI_TRANSPORTID_PROTOCOLID_SRP;
|
||||
|
||||
if (!sess) {
|
||||
res = SCSI_TRANSPORTID_PROTOCOLID_SRP;
|
||||
if (!sess)
|
||||
goto out;
|
||||
}
|
||||
|
||||
ch = scst_sess_get_tgt_priv(sess);
|
||||
BUG_ON(!ch);
|
||||
|
||||
BUILD_BUG_ON(sizeof(*tr_id) != 24);
|
||||
|
||||
res = -ENOMEM;
|
||||
tr_id = kzalloc(sizeof(struct spc_rdma_transport_id), GFP_KERNEL);
|
||||
if (!tr_id) {
|
||||
pr_err("Allocation of TransportID failed\n");
|
||||
res = -ENOMEM;
|
||||
if (!tr_id)
|
||||
goto out;
|
||||
}
|
||||
|
||||
res = 0;
|
||||
tr_id->protocol_identifier = SCSI_TRANSPORTID_PROTOCOLID_SRP;
|
||||
|
||||
Reference in New Issue
Block a user