mirror of https://gitee.com/openkylin/linux.git
[SCSI] zfcp: NULL vs 0 usage
Get rid of two 'warning: Using plain integer as NULL pointer'. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
0d661327a7
commit
aa551daf5c
|
@ -1526,15 +1526,12 @@ zfcp_gid_pn_buffers_alloc(struct zfcp_gid_pn_data **gid_pn, mempool_t *pool)
|
||||||
* zfcp_gid_pn_buffers_free - free buffers for GID_PN nameserver request
|
* zfcp_gid_pn_buffers_free - free buffers for GID_PN nameserver request
|
||||||
* @gid_pn: pointer to struct zfcp_gid_pn_data which has to be freed
|
* @gid_pn: pointer to struct zfcp_gid_pn_data which has to be freed
|
||||||
*/
|
*/
|
||||||
static void
|
static void zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn)
|
||||||
zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn)
|
|
||||||
{
|
{
|
||||||
if ((gid_pn->ct.pool != 0))
|
if (gid_pn->ct.pool)
|
||||||
mempool_free(gid_pn, gid_pn->ct.pool);
|
mempool_free(gid_pn, gid_pn->ct.pool);
|
||||||
else
|
else
|
||||||
kfree(gid_pn);
|
kfree(gid_pn);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1930,7 +1930,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
|
||||||
skip_fsfstatus:
|
skip_fsfstatus:
|
||||||
send_els->status = retval;
|
send_els->status = retval;
|
||||||
|
|
||||||
if (send_els->handler != 0)
|
if (send_els->handler)
|
||||||
send_els->handler(send_els->handler_data);
|
send_els->handler(send_els->handler_data);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
|
Loading…
Reference in New Issue