linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sumit Saxena <sumit.saxena@broadcom.com>
To: weiping zhang <zhangweiping@didichuxing.com>,
	Kashyap Desai <kashyap.desai@broadcom.com>,
	Shivasharan Srikanteshwara
	<shivasharan.srikanteshwara@broadcom.com>
Cc: "PDL,MEGARAIDLINUX" <megaraidlinux.pdl@broadcom.com>,
	linux-scsi@vger.kernel.org
Subject: RE: [PATCH] scsi: megaraid_sas: fix error handle in megasas_probe_one
Date: Mon, 7 Aug 2017 23:14:23 +0530	[thread overview]
Message-ID: <03fabd3896ffd7c04c0060eb5ce28f86@mail.gmail.com> (raw)
In-Reply-To: <20170807172650.GA33146@bogon.didichuxing.com>

>-----Original Message-----
>From: weiping zhang [mailto:zhangweiping@didichuxing.com]
>Sent: Monday, August 07, 2017 10:57 PM
>To: kashyap.desai@broadcom.com; sumit.saxena@broadcom.com;
>shivasharan.srikanteshwara@broadcom.com
>Cc: megaraidlinux.pdl@broadcom.com; linux-scsi@vger.kernel.org
>Subject: [PATCH] scsi: megaraid_sas: fix error handle in
megasas_probe_one
>
>megasas_mgmt_info.max_index has increased by 1 before
>megasas_io_attach, if megasas_io_attach return error, then goto
>fail_io_attach, megasas_mgmt_info.instance has a wrong index here. So
first
>reduce max_index and then set that instance to NULL.
>
>Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
>---
> drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
>b/drivers/scsi/megaraid/megaraid_sas_base.c
>index b5b9ba7..91eeec9 100644
>--- a/drivers/scsi/megaraid/megaraid_sas_base.c
>+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
>@@ -6226,8 +6226,8 @@ static int megasas_probe_one(struct pci_dev *pdev,
> fail_start_aen:
> fail_io_attach:
> 	megasas_mgmt_info.count--;
>-	megasas_mgmt_info.instance[megasas_mgmt_info.max_index] =
>NULL;
> 	megasas_mgmt_info.max_index--;
>+	megasas_mgmt_info.instance[megasas_mgmt_info.max_index] =
>NULL;
>
> 	instance->instancet->disable_intr(instance);
> 	megasas_destroy_irqs(instance);

Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>

>--
>2.9.4

  reply	other threads:[~2017-08-07 17:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 17:26 [PATCH] scsi: megaraid_sas: fix error handle in megasas_probe_one weiping zhang
2017-08-07 17:44 ` Sumit Saxena [this message]
2017-08-08  1:55 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03fabd3896ffd7c04c0060eb5ce28f86@mail.gmail.com \
    --to=sumit.saxena@broadcom.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=megaraidlinux.pdl@broadcom.com \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=zhangweiping@didichuxing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).