[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6781780e-a01f-a9f4-62fa-c36e105a4b76@metux.net>
Date: Tue, 20 Aug 2019 13:16:09 +0200
From: "Enrico Weigelt, metux IT consult" <lkml@...ux.net>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
"Enrico Weigelt, metux IT consult" <info@...ux.net>
Cc: linux-kernel@...r.kernel.org, linux-input@...r.kernel.org
Subject: Re: [PATCH] input: misc: soc_button_array: use
platform_device_register_resndata()
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@...ux.net -- +49-151-27565287
Powered by blists - more mailing lists