Fix I2C-drivers which missed setting clientdata to NULL before freeing the
structure it points to. Also fix drivers which do this _after_ the structure
was freed already.
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
fail2:
iio_device_unregister(chip->indio_dev);
fail1:
+ i2c_set_clientdata(client, NULL);
kfree(chip);
return err;
}
iio_device_unregister(chip->indio_dev);
+ i2c_set_clientdata(client, NULL);
kfree(chip);
return 0;
}