From: Bart Van Assche <bvanassche@acm.org>
To: Joe Lawrence <Joe.Lawrence@stratus.com>
Cc: linux-scsi@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Jiri Kosina <jkosina@suse.cz>,
"James E.J. Bottomley" <JBottomley@parallels.com>
Subject: Re: [PATCH] block,scsi: verify return pointer from blk_get_request
Date: Tue, 19 Mar 2013 14:55:54 +0100 [thread overview]
Message-ID: <51486E6A.4050907@acm.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1303171328250.1736@jlaw-desktop.mno.stratus.com>
On 03/17/13 18:32, Joe Lawrence wrote:
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index c1b05a8..8f009c4 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -1635,6 +1635,8 @@ static void scsi_eh_lock_door(struct scsi_device *sdev)
> * request becomes available
> */
> req = blk_get_request(sdev->request_queue, READ, GFP_KERNEL);
> + if (!req)
> + return -ENOMEM;
>
> req->cmd[0] = ALLOW_MEDIUM_REMOVAL;
> req->cmd[1] = 0;
scsi_eh_lock_door() doesn't return a value to it's caller so I think a
plain "return" statement is sufficient here.
Bart.
next prev parent reply other threads:[~2013-03-19 13:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-17 17:32 [PATCH] block,scsi: verify return pointer from blk_get_request Joe Lawrence
2013-03-17 22:44 ` Jens Axboe
2013-05-23 20:40 ` James Bottomley
2013-05-23 21:37 ` Joe Lawrence
2013-03-19 13:55 ` Bart Van Assche [this message]
2013-03-26 19:06 ` [PATCH v2] block: handle pointer error " Joe Lawrence
2013-03-26 22:34 ` [PATCH v3] " Joe Lawrence
2013-05-23 20:09 ` [PATCH v4] " Joe Lawrence
2013-05-23 20:24 ` Boaz Harrosh
2013-05-24 18:15 ` [PATCH v5 0/2] block,scsi: fixup blk_get_request dead queue scenarios Joe Lawrence
2013-05-24 18:16 ` [PATCH v5 1/2] block,scsi: verify return pointer from blk_get_request Joe Lawrence
2013-05-27 14:42 ` Jiri Kosina
2013-05-24 18:17 ` [PATCH v5 2/2] block,scsi: convert and handle ERR_PTR " Joe Lawrence
2013-05-27 14:42 ` Jiri Kosina
2013-07-24 14:29 ` [PATCH v5 0/2] block,scsi: fixup blk_get_request dead queue scenarios Joe Lawrence
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=51486E6A.4050907@acm.org \
--to=bvanassche@acm.org \
--cc=JBottomley@parallels.com \
--cc=Joe.Lawrence@stratus.com \
--cc=axboe@kernel.dk \
--cc=jkosina@suse.cz \
--cc=linux-scsi@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.