Re: [PATCH] i2c: muxes: Fix return value check in mule_i2c_mux_probe()

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

 



Hi,

On 04.11.24 11:56, Wolfram Sang wrote:
On Thu, Oct 31, 2024 at 01:09:17PM +0100, Andi Shyti wrote:
Hi Yang,

On Sat, Oct 26, 2024 at 11:09:42AM +0800, Yang Yingliang wrote:
From: Yang Yingliang <yangyingliang@xxxxxxxxxx>

If dev_get_regmap() fails, it returns NULL pointer not ERR_PTR(),
replace IS_ERR() with NULL pointer check, and return -ENODEV.

Fixes: d0f8e97866bf ("i2c: muxes: add support for tsd,mule-i2c multiplexer")
Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
merged to i2c/i2c-host-fixes.
I'd like an ack from Farouk here. In general, -ENODEV makes the driver
core sliently fail (ok, we have a printout but still). But not getting
the regmap sounds like a real error to me. I'd suggest -ENOENT or
something. But maybe this mux is a special case, Farouk should know.


I think the -ENODEV is good enough since we already log the error.

Thanks

Best regards





[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