Skip to content

Commit 6f37e21

Browse files
Dan Carpentermartinkpetersen
authored andcommitted
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: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 89b203e commit 6f37e21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/libfc/fc_disc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp,
573573
event = DISC_EV_FAILED;
574574
}
575575
if (error)
576-
fc_disc_error(disc, fp);
576+
fc_disc_error(disc, ERR_PTR(error));
577577
else if (event != DISC_EV_NONE)
578578
fc_disc_done(disc, event);
579579
fc_frame_free(fp);

0 commit comments

Comments
 (0)