From: Tomas Henzl <thenzl@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
"James E.J. Bottomley" <JBottomley@odin.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Hariprasad Shenai <hariprasad@chelsio.com>,
Praveen Madhavan <praveenm@chelsio.com>,
linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] csiostor: fix an error code in csio_hw_init()
Date: Thu, 16 Apr 2015 12:22:15 +0000 [thread overview]
Message-ID: <552FA977.9070302@redhat.com> (raw)
In-Reply-To: <20150414143219.GA30421@mwanda>
On 04/14/2015 04:32 PM, Dan Carpenter wrote:
> We should return -ENOMEM if kzalloc() fails here instead of returning
> success.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
> index 2e66f34..622bdab 100644
> --- a/drivers/scsi/csiostor/csio_hw.c
> +++ b/drivers/scsi/csiostor/csio_hw.c
> @@ -3928,6 +3928,7 @@ csio_hw_init(struct csio_hw *hw)
>
> evt_entry = kzalloc(sizeof(struct csio_evt_msg), GFP_KERNEL);
> if (!evt_entry) {
> + rv = -ENOMEM;
> csio_err(hw, "Failed to initialize eventq");
> goto err_evtq_cleanup;
> }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Tomas
prev parent reply other threads:[~2015-04-16 12:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 14:32 [patch] csiostor: fix an error code in csio_hw_init() Dan Carpenter
2015-04-16 12:22 ` Tomas Henzl [this message]
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=552FA977.9070302@redhat.com \
--to=thenzl@redhat.com \
--cc=JBottomley@odin.com \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=hariprasad@chelsio.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=praveenm@chelsio.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