All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Vadim Pasternak <vadimp@mellanox.com>
Cc: "jdelvare@suse.com" <jdelvare@suse.com>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jiri@resnulli.us" <jiri@resnulli.us>
Subject: Re: [patch] Disable PMBus status check for DPS400 PSU controller
Date: Thu, 21 Jul 2016 07:31:25 -0700	[thread overview]
Message-ID: <5790DCBD.3030903@roeck-us.net> (raw)
In-Reply-To: <AM5PR0501MB209769770BC712B75FB7F768A2090@AM5PR0501MB2097.eurprd05.prod.outlook.com>

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


      reply	other threads:[~2016-07-21 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 14:55 [patch] Disable PMBus status check for DPS400 PSU controller Vadim Pasternak
2016-07-21 13:41 ` Guenter Roeck
2016-07-21 14:08   ` Vadim Pasternak
2016-07-21 14:31     ` Guenter Roeck [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=5790DCBD.3030903@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=jiri@resnulli.us \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vadimp@mellanox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.