Commit 6f37e210 authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen

scsi: libfc: pass an error pointer to fc_disc_error()

This patch is basically to silence a static checker warning.

    drivers/scsi/libfc/fc_disc.c:326 fc_disc_error()
    warn: passing a valid pointer to 'PTR_ERR'

It doesn't affect runtime because it treats -ENOMEM and a valid pointer
the same.  But the documentation says we should be passing an error
pointer.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarJohannes Thumshirn <jth@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 89b203e9
...@@ -573,7 +573,7 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp, ...@@ -573,7 +573,7 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp,
event = DISC_EV_FAILED; event = DISC_EV_FAILED;
} }
if (error) if (error)
fc_disc_error(disc, fp); fc_disc_error(disc, ERR_PTR(error));
else if (event != DISC_EV_NONE) else if (event != DISC_EV_NONE)
fc_disc_done(disc, event); fc_disc_done(disc, event);
fc_frame_free(fp); fc_frame_free(fp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment