[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d63a3757-0f58-d125-b735-7fe86230bc9c@wanadoo.fr>
Date: Thu, 25 May 2023 21:16:32 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: 张网 <m202171703@...t.edu.cn>
Cc: Peter Korsgaard <peter@...sgaard.com>,
Andrew Lunn <andrew@...n.ch>,
hust-os-kernel-patches@...glegroups.com, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org,
Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [PATCH v3] i2c: ocores: use devm_ managed clks
Le 25/05/2023 à 05:33, 张网 a écrit :
> Hi Christophe,
>
> Thanks for your suggestions. However, both clk_get_rate and clk_prepare_enable
> will return 0 if i2c->clk is NULL, so I think we may not need to take this issue
> into account.
>
> Regards,
> Wang Zhang
>
Ouch!
For some reaon, when I read:
> + rate = clk_get_rate(i2c->clk) / 1000;
I read "if i2c->clk is NULL, then the i2c pointer is NULL as well and is
dereferenced".
:/
sorry for the noise.
CJ (slightly ashamed)
Powered by blists - more mailing lists