linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH] input: misc: soc_button_array: use platform_device_register_resndata()
Date: Tue, 20 Aug 2019 13:16:09 +0200	[thread overview]
Message-ID: <6781780e-a01f-a9f4-62fa-c36e105a4b76@metux.net> (raw)
In-Reply-To: <20190729172313.GA755@penguin>

On 29.07.19 19:23, Dmitry Torokhov wrote:

Hi,

> I wonder if we should pass &pdev->dev instead of NULL here to form
> proper device hierarchy, now that we have this option.

good point, thanks, fixed in v2.


>> +		"gpio-keys",
>> +		PLATFORM_DEVID_AUTO,
>> +		NULL,
>> +		0,
>> +		gpio_keys_pdata,
>> +		sizeof(*gpio_keys_pdata));
>> +
>> +	if (IS_ERR(pd)) {
>> +		dev_err(&pdev->dev, "failed registering gpio-keys: %ld\n", PTR_ERR(pd));
>>   		goto err_free_mem;
> 
> Since you did not assign 'error' value here this goto will result in the
> function returning 0 even if platform_device_register_resndata() failed.

Uh, thanks. IMHO it's even worse: 'error' could be uninitialized.


I'm sending v2 separately.


Thanks for your review.

--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

      reply	other threads:[~2019-08-20 11:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 14:26 [PATCH] input: misc: soc_button_array: use platform_device_register_resndata() Enrico Weigelt, metux IT consult
2019-07-29 17:23 ` Dmitry Torokhov
2019-08-20 11:16   ` Enrico Weigelt, metux IT consult [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=6781780e-a01f-a9f4-62fa-c36e105a4b76@metux.net \
    --to=lkml@metux.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=info@metux.net \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).