Re: Re: [lvc-project] [PATCH] i2c: Fix NULL pointer dereference in npcm_i2c_reg_slave

From: Wolfram Sang
Date: Sat Feb 03 2024 - 15:44:56 EST



> If I'm not missing something, npcm_i2c_reg_slave() is called via a
> function pointer ->reg_slave here [1]. And seems `client` can't be NULL
> there. Other drivers implementing ->reg_slave function don't check its
> argument.

Correct, we trust ourselves here.

> Maybe we should just drop `if (!bus->slave)` check?

Yes.

Attachment: signature.asc
Description: PGP signature