in drivers/misc/sfp/amzn-sfp.c [390:404]
static int amzn_sfp_remove(struct i2c_client *client)
{
struct amzn_sfp_softc *sc;
/* Paranoia... */
if (client == NULL)
return -EINVAL;
sc = i2c_get_clientdata(client);
if (sc == NULL)
return -ENODEV;
i2c_set_clientdata(client, NULL);
sysfs_remove_bin_file(&client->dev.kobj, &sc->attr);
return 0;
}