lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAAP30GsU1wy87QJjcctpu-=uYH6O0XEikMs5GeGDsz-gvwsZQ@mail.gmail.com>
Date:	Thu, 21 Jun 2012 08:37:18 -0300
From:	Alexandre Pereira da Silva <aletes.xgr@...il.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Grant Likely <grant.likely@...retlab.ca>,
	Rob Herring <rob.herring@...xeda.com>,
	JJ Ding <dgdunix@...il.com>, Roland Stigge <stigge@...com.de>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree-discuss@...ts.ozlabs.org
Subject: Re: [PATCH RESEND] input: gpio_keys_polled: convert to dt

On Thu, Jun 21, 2012 at 6:18 AM, Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
>> @@ -38,7 +40,7 @@ struct gpio_keys_button_data {
>>  struct gpio_keys_polled_dev {
>>       struct input_polled_dev *poll_dev;
>>       struct device *dev;
>> -     struct gpio_keys_platform_data *pdata;
>> +     struct gpio_keys_platform_data pdata;
>
> I am not sure why this change is needed. Also it seems that the driver
> leaks DT-created pdata on unload.

Pdata is now a member of gpio_keys_polled_dev now and that one is
kzalloc'ed at probe and kfree'd at the removal and errors. I see no
leaks there.

I could kzalloc and kfree gpio_keys_polled_dev independently instead,
to avoid all those pointer changes if you think it's better.

This is mostly a clone from the dt handling in gpio_keys, and
comparing both now,
I see that it will leak on pdata->buttons, so I will fix that.

>> +
>> +#define gpio_keys_polled_of_match NULL
>
> Please use of_match_ptr() instead.

Thanks for the suggestion, I will implement that.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ