All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Pu Lehui <pulehui@huawei.com>
Cc: anton@enomsg.org, ccross@android.com, tony.luck@intel.com,
	linux-kernel@vger.kernel.org, zhangjinhao2@huawei.com
Subject: Re: [PATCH -next] pstore/blk: Fix return value check in pstore_blk_init()
Date: Wed, 16 Jun 2021 20:19:25 -0700	[thread overview]
Message-ID: <202106162019.1766DA0@keescook> (raw)
In-Reply-To: <20210617005424.182305-1-pulehui@huawei.com>

On Thu, Jun 17, 2021 at 08:54:24AM +0800, Pu Lehui wrote:
> Fix the return value check which testing the wrong variable
> in pstore_blk_init().
> 
> Signed-off-by: Pu Lehui <pulehui@huawei.com>
> ---
>  fs/pstore/blk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/pstore/blk.c b/fs/pstore/blk.c
> index ccfb11ee4d50..d5e22e6209a6 100644
> --- a/fs/pstore/blk.c
> +++ b/fs/pstore/blk.c
> @@ -287,7 +287,7 @@ static int __init pstore_blk_init(void)
>  		struct pstore_device_info *best_effort_dev;
>  
>  		best_effort_dev = kzalloc(sizeof(*best_effort_dev), GFP_KERNEL);
> -		if (!best_effort) {
> +		if (!best_effort_dev) {
>  			ret = -ENOMEM;
>  			goto unlock;
>  		}

Whoops; thanks!

-- 
Kees Cook

      reply	other threads:[~2021-06-17  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17  0:54 [PATCH -next] pstore/blk: Fix return value check in pstore_blk_init() Pu Lehui
2021-06-17  3:19 ` Kees Cook [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=202106162019.1766DA0@keescook \
    --to=keescook@chromium.org \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pulehui@huawei.com \
    --cc=tony.luck@intel.com \
    --cc=zhangjinhao2@huawei.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 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.