lkml.org 
[lkml]   [2016]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/2] mfd: intel_quark_i2c_gpio: remove clock tree on error path
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.

> - clk_unregister(quark_mfd->i2c_clk);

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

\
 
 \ /
  Last update: 2016-02-19 04:01    [W:1.149 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site