Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1337953
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v1 1/2] mfd: intel_quark_i2c_gpio: remove clock tree on error path |
| Date | 2016-02-19 09:20 +0100 |
| Message-ID | <r3Os9-295-9@gated-at.bofh.it> (permalink) |
| References | <r37wS-51u-21@gated-at.bofh.it> <r3JiN-6Fz-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Feb 19, 2016 at 4:45 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 02/17, Andy Shevchenko wrote:
>> diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b/drivers/mfd/intel_quark_i2c_gpio.c
>> index bdc5e27..43d8066 100644
>> --- a/drivers/mfd/intel_quark_i2c_gpio.c
>> +++ b/drivers/mfd/intel_quark_i2c_gpio.c
>> @@ -150,11 +150,10 @@ static void intel_quark_unregister_i2c_clk(struct pci_dev *pdev)
>> {
>> struct intel_quark_mfd *quark_mfd = dev_get_drvdata(&pdev->dev);
>>
>> - if (!quark_mfd->i2c_clk || !quark_mfd->i2c_clk_lookup)
>> + clk_unregister(quark_mfd->i2c_clk);
>> + if (!quark_mfd->i2c_clk_lookup)
>> return;
>> -
>> clkdev_drop(quark_mfd->i2c_clk_lookup);
>
> It's probably not a great idea to unregister the clk before the
> lookup is dropped. I suppose nothing too bad will happen though
> because we handle this case in the framework and substitute dummy
> ops in place of the real ones.
Thanks for pointing this out.
Okay, I will re-do this. I think the correct one is to add
clk_unregister() call to the _register_i2c_clk().
--
With Best Regards,
Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v1 1/2] mfd: intel_quark_i2c_gpio: remove clock tree on error path Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-02-17 11:40 +0100
Re: [PATCH v1 1/2] mfd: intel_quark_i2c_gpio: remove clock tree on error path Stephen Boyd <sboyd@codeaurora.org> - 2016-02-19 03:50 +0100
Re: [PATCH v1 1/2] mfd: intel_quark_i2c_gpio: remove clock tree on error path Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-02-19 09:20 +0100
csiph-web