On Tue, Apr 26, 2022 at 08:35:41AM -0300, Jason Gunthorpe wrote: > On Tue, Apr 26, 2022 at 07:35:29AM +0300, Jarkko Sakkinen wrote: > > > Even if chip is expected not to be NULL, a sanity check costs nothing. > > As already said, this should be reviewed in the context of the callback > > change. > > > > Even then, the change should rather be: > > > > if (!chip) { > > dev_err(dev, "Could not get client data at remove\n"); > > return; > > } > > If it can't happen by design it should be deleted entirely, or be > turned into a WARN_ON: > > if (WARN_ON(!chip)) > return; > > But I find this largely unnecessary as a null chip will reliably oops > later on in the same function. > > Jason Fine, I applied the patch. BR, Jarkko