mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Dietrich <marvin24@gmx.de>
To: Xidong Wang <wangxidong_97@163.com>
Cc: Marc Dietrich <marvin24@gmx.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	ac100@lists.launchpad.net, linux-tegra@vger.kernel.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] staging: nvec: check return value
Date: Thu, 19 Dec 2019 18:40:45 +0100 (CET)	[thread overview]
Message-ID: <alpine.OSX.2.21.1912191837580.5811@macbook-pro.fritz.box> (raw)
In-Reply-To: <1576648598-12257-1-git-send-email-wangxidong_97@163.com>

Hello Xidong,

On Wed, 18 Dec 2019, Xidong Wang wrote:

> In nvec_kbd_probe(), the return value of devm_input_allocate_device()
> should be checked before it is used.
>
> Signed-off-by: Xidong Wang <wangxidong_97@163.com>

looks good to me. Thanks!

Acked-by: Marc Dietrich <marvin24@gmx.de>

> ---
> drivers/staging/nvec/nvec_kbd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c
> index 01dbb66..386d619 100644
> --- a/drivers/staging/nvec/nvec_kbd.c
> +++ b/drivers/staging/nvec/nvec_kbd.c
> @@ -123,6 +123,8 @@ static int nvec_kbd_probe(struct platform_device *pdev)
> 		keycodes[j++] = extcode_tab_us102[i];
>
> 	idev = devm_input_allocate_device(&pdev->dev);
> +	if (!idev)
> +		return -ENOMEM;
> 	idev->name = "nvec keyboard";
> 	idev->phys = "nvec";
> 	idev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | BIT_MASK(EV_LED);
> -- 
> 2.7.4
>
>

      reply	other threads:[~2019-12-19 17:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18  5:56 Xidong Wang
2019-12-19 17:40 ` Marc Dietrich [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=alpine.OSX.2.21.1912191837580.5811@macbook-pro.fritz.box \
    --to=marvin24@gmx.de \
    --cc=ac100@lists.launchpad.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=wangxidong_97@163.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

all inboxes | Powered by JetHome®