mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Colin King <colin.king@canonical.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] scsi: sg: return -ENOMEM on out of memory error
Date: Thu, 11 Mar 2021 21:32:43 -0500	[thread overview]
Message-ID: <90e260c2-34f7-e156-0c36-6ff00c91311b@interlog.com> (raw)
In-Reply-To: <20210311233359.81305-1-colin.king@canonical.com>

On 2021-03-11 6:33 p.m., Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The sg_proc_seq_show_debug should return -ENOMEM on an
> out of memory error rather than -1. Fix this.
> 
> Fixes: 94cda6cf2e44 ("scsi: sg: Rework debug info")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Douglas Gilbert <dgilbert@interlog.com>

Thanks.

> ---
>   drivers/scsi/sg.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
> index 79f05afa4407..85e86cbc6891 100644
> --- a/drivers/scsi/sg.c
> +++ b/drivers/scsi/sg.c
> @@ -4353,7 +4353,7 @@ sg_proc_seq_show_debug(struct seq_file *s, void *v)
>   	if (!bp) {
>   		seq_printf(s, "%s: Unable to allocate %d on heap, finish\n",
>   			   __func__, bp_len);
> -		return -1;
> +		return -ENOMEM;
>   	}
>   	read_lock_irqsave(&sg_index_lock, iflags);
>   	sdp = it ? sg_lookup_dev(it->index) : NULL;
> 


      reply	other threads:[~2021-03-12  2:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 23:33 Colin King
2021-03-12  2:32 ` Douglas Gilbert [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=90e260c2-34f7-e156-0c36-6ff00c91311b@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=colin.king@canonical.com \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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

Powered by JetHome