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] [day] [month] [year] [list]
Date:	Thu, 21 Jul 2016 07:31:25 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Vadim Pasternak <vadimp@...lanox.com>
Cc:	"jdelvare@...e.com" <jdelvare@...e.com>,
	"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"jiri@...nulli.us" <jiri@...nulli.us>
Subject: Re: [patch] Disable PMBus status check for DPS400 PSU controller

On 07/21/2016 07:08 AM, Vadim Pasternak wrote:

[ ... ]

>>>    };
>>>
>>> diff --git a/drivers/hwmon/pmbus/pmbus_core.c
>>> b/drivers/hwmon/pmbus/pmbus_core.c
>>> index ba59eae..3d98070 100644
>>> --- a/drivers/hwmon/pmbus/pmbus_core.c
>>> +++ b/drivers/hwmon/pmbus/pmbus_core.c
>>> @@ -1931,8 +1931,11 @@ EXPORT_SYMBOL_GPL(pmbus_do_probe);
>>>    int pmbus_do_remove(struct i2c_client *client)
>>>    {
>>>    	struct pmbus_data *data = i2c_get_clientdata(client);
>>> +	const struct pmbus_platform_data *pdata =
>>> +				dev_get_platdata(&client->dev);
>>>    	hwmon_device_unregister(data->hwmon_dev);
>>>    	kfree(data->group.attrs);
>>> +	kfree(pdata);
>
> So, if I use in allocation
>                 pdata = devm_kzalloc(&client->dev,
>                                      sizeof(struct pmbus_platform_data),
>                                      GFP_KERNEL);
> I also can drop the above three lines, right?
>

Correct.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ