mirror of
https://github.com/torvalds/linux.git
synced 2026-12-05 12:54:27 +00:00
The call to put_i2c_dev() frees "i2c_dev" so there is a use after
free when we call cdev_del(&i2c_dev->cdev).
Fixes: d6760b14d4 ('i2c: dev: switch from register_chrdev to cdev API')
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>