All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andrew Duggan <aduggan@synaptics.com>,
	Nick Dyer <nick@shmanahar.org>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Wei Yongjun <weiyongjun1@huawei.com>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts()
Date: Tue, 7 Feb 2017 16:00:37 +0100	[thread overview]
Message-ID: <20170207150037.GB18493@mail.corp.redhat.com> (raw)
In-Reply-To: <20170207145225.31228-1-weiyj.lk@gmail.com>

On Feb 07 2017 or thereabouts, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fix to return error code -ENOMEM from the devm_kzalloc() error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functions
> from probe")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---

Good catch.

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

>  drivers/input/rmi4/rmi_driver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
> index bf5c36e..0c54446 100644
> --- a/drivers/input/rmi4/rmi_driver.c
> +++ b/drivers/input/rmi4/rmi_driver.c
> @@ -1049,7 +1049,7 @@ int rmi_probe_interrupts(struct rmi_driver_data *data)
>  	data->irq_memory = devm_kzalloc(dev, size * 4, GFP_KERNEL);
>  	if (!data->irq_memory) {
>  		dev_err(dev, "Failed to allocate memory for irq masks.\n");
> -		return retval;
> +		return -ENOMEM;
>  	}
>  
>  	data->irq_status	= data->irq_memory + size * 0;
> 

  reply	other threads:[~2017-02-07 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 14:52 [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts() Wei Yongjun
2017-02-07 15:00 ` Benjamin Tissoires [this message]
2017-02-07 18:00   ` Dmitry Torokhov

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=20170207150037.GB18493@mail.corp.redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=aduggan@synaptics.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=nick@shmanahar.org \
    --cc=weiyj.lk@gmail.com \
    --cc=weiyongjun1@huawei.com \
    --cc=yamada.masahiro@socionext.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.