On Sun, Nov 03, 2024 at 11:22:08AM +0000, Jonathan Cameron wrote:
> Hi Aren,
> 
> > @@ -624,7 +640,7 @@ static int stk3310_probe(struct i2c_client *client)
> >     device_property_read_u32(&client->dev, "proximity-near-level",
> >                              &data->ps_near_level);
> >  
> > -   mutex_init(&data->lock);
> > +   devm_mutex_init(&client->dev, &data->lock);
> ret = devm_mutex_init()
> if (ret)
>       return ret;
> 
> It is very unlikely to fail but technically it can.  Andy has been fixing
> this up across the kernel (including IIO) so let's not introduce another
> case that doesn't check it!

Right, I'll take this as my periodic reminder to read the docs / types
more carefully :)

> If nothing else comes up I can probably tidy that up whilst applying.

That would be great

Thanks
 - Aren

Reply via email to