Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1447926

Re: [patch] Disable PMBus status check for DPS400 PSU controller

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [patch] Disable PMBus status check for DPS400 PSU controller
Date 2016-07-21 16:40 +0200
Message-ID <rXniO-cH-27@gated-at.bofh.it> (permalink)
References <rXlK1-7xV-9@gated-at.bofh.it> <rXmwq-85l-21@gated-at.bofh.it> <rXniO-cH-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[patch] Disable PMBus status check for DPS400 PSU controller Vadim Pasternak <vadimp@mellanox.com> - 2016-07-21 15:00 +0200
  Re: [patch] Disable PMBus status check for DPS400 PSU controller Guenter Roeck <linux@roeck-us.net> - 2016-07-21 15:50 +0200
    Re: [patch] Disable PMBus status check for DPS400 PSU controller Guenter Roeck <linux@roeck-us.net> - 2016-07-21 16:40 +0200
    RE: [patch] Disable PMBus status check for DPS400 PSU controller Vadim Pasternak <vadimp@mellanox.com> - 2016-07-21 21:10 +0200

csiph-web