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

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>
---
 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 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 14:52 Wei Yongjun [this message]
2017-02-07 15:00 ` [PATCH -next] Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts() Benjamin Tissoires
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=20170207145225.31228-1-weiyj.lk@gmail.com \
    --to=weiyj.lk@gmail.com \
    --cc=aduggan@synaptics.com \
    --cc=benjamin.tissoires@redhat.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox