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] [day] [month] [year] [list]
Message-ID: <562691D7.30602@pengutronix.de>
Date:	Tue, 20 Oct 2015 21:11:19 +0200
From:	Marc Kleine-Budde <mkl@...gutronix.de>
To:	"Anton.Glukhov" <anton.a.glukhov@...il.com>,
	linux-can@...r.kernel.org
Cc:	hs@...x.de, netdev@...r.kernel.org
Subject: Re: [PATCH v2] net, can, ti_hecc: fix a run time warn_on.

On 10/20/2015 06:30 PM, Anton.Glukhov wrote:
>>> +	clk_disable_unprepare(priv->clk);
>>> +	priv->clk = NULL;
>>>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>  	iounmap(priv->base);
>>>  	release_mem_region(res->start, resource_size(res));
>>> @@ -1009,7 +1010,7 @@ static int ti_hecc_suspend(struct platform_device *pdev, pm_message_t state)
>>>  	hecc_set_bit(priv, HECC_CANMC, HECC_CANMC_PDR);
>>>  	priv->can.state = CAN_STATE_SLEEPING;
>>>  
>>> -	clk_disable(priv->clk);
>>> +	clk_disable_unprepare(priv->clk);
>>>  
>>>  	return 0;
>>>  }
>>> @@ -1019,7 +1020,7 @@ static int ti_hecc_resume(struct platform_device *pdev)
>>>  	struct net_device *dev = platform_get_drvdata(pdev);
>>>  	struct ti_hecc_priv *priv = netdev_priv(dev);
>>>  
>>> -	clk_enable(priv->clk);
>>> +	clk_prepare_enable(priv->clk);
>>
>> please add error checking.
>>
> 
> Why it wasn't added with clk_enable? Is it bug? I'm confused here, because in so many drivers
> there is no checking err after clk_enable or clk_prepare_enable. Maybe I missed something...
> Could you clarify this part please?

I wouldn't call it a bug in the original driver, it probably slipped
through the review or I didn't know better.

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


Download attachment "signature.asc" of type "application/pgp-signature" (456 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ