diff options
author | Dan Carpenter | 2017-07-12 09:30:22 +0200 |
---|---|---|
committer | Martin K. Petersen | 2017-07-12 23:25:12 +0200 |
commit | 6f37e2102778d3437a416684680cc5ce295f2042 (patch) | |
tree | adce9579cc427ca6de2aa182d1c8614e1c551d02 | |
parent | scsi: hisi_sas: make several const arrays static (diff) | |
download | kernel-qcow2-linux-6f37e2102778d3437a416684680cc5ce295f2042.tar.gz kernel-qcow2-linux-6f37e2102778d3437a416684680cc5ce295f2042.tar.xz kernel-qcow2-linux-6f37e2102778d3437a416684680cc5ce295f2042.zip |
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>
-rw-r--r-- | drivers/scsi/libfc/fc_disc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index fd501f8dbb11..8660f923ace0 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c @@ -573,7 +573,7 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp, event = DISC_EV_FAILED; } if (error) - fc_disc_error(disc, fp); + fc_disc_error(disc, ERR_PTR(error)); else if (event != DISC_EV_NONE) fc_disc_done(disc, event); fc_frame_free(fp); |