Re: [PATCH v3] i2c: ocores: use devm_ managed clks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux