> > +const void *i2c_get_match_data(const struct i2c_client *client) { > > + struct device_driver *drv = client->dev.driver; > > + struct i2c_driver *driver = to_i2c_driver(drv); > > + const struct i2c_device_id *match; > > + const void *data; > > + > > + data = device_get_match_data(&client->dev); > > if (data) > return data; I like Biju's version a tad more. Except for errors, and especially within small functions, I think single exit points are easier to understand.
Attachment:
signature.asc
Description: PGP signature