From e4a9a98289606392f2b1b24b4ca4e29154ec4d15 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 28 Jan 2011 16:03:31 -0800 Subject: [PATCH] [SCSI] libfc:prevent dereferencing ERR_PTR in fc_tm_done() If we goto out, then it tries to call kfree_skb() on an ERR_PTR which will oops. Just return directly. Signed-off-by: Dan Carpenter Signed-off-by: Robert Love Signed-off-by: James Bottomley --- drivers/scsi/libfc/fc_fcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index ba639fa..f4eb1ab 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -1323,7 +1323,7 @@ static void fc_tm_done(struct fc_seq *seq, struct fc_frame *fp, void *arg) * * scsi-eh will escalate for when either happens. */ - goto out; + return; } if (fc_fcp_lock_pkt(fsp)) -- 2.7.4