On Wed, Aug 02, 2023 at 07:59:21AM +0000, Biju Das wrote: > > On Tue, Aug 01, 2023 at 06:03:18PM +0100, Biju Das wrote: ... > > > - struct i2c_driver *driver = to_i2c_driver(client->dev.driver); > > > > Does it make sense to remove and add an additional parameter? In one > > case it's a copy, in another it probably the same, just hidden in the > > code. > > Ok, you mean add the below check in i2c_device_get_match_data() and > drop *driver parameter from i2c_get_match_data_helper(). Right. > if (!client || !dev->driver) > return NULL; Not sure if you need this here in this static helper. -- With Best Regards, Andy Shevchenko