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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160219024531.GR4847@codeaurora.org>
Date:	Thu, 18 Feb 2016 18:45:31 -0800
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:	Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ