summaryrefslogtreecommitdiff
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorFelix Gu <ustc.gu@gmail.com>2026-03-27 20:27:54 +0800
committerJonathan Cameron <jic23@kernel.org>2026-04-28 16:36:09 +0100
commitb66f922f6a4fa92840f662fbcfeb4f8a0f774bcc (patch)
treef0e49a6cf7a2389790154fd78f9a432f1c5937f7 /scripts/objdiff
parent673478bc29cf72010faaf293c1c8c667393335a0 (diff)
iio: light: veml6070: Fix resource leak in probe error path
The driver calls i2c_new_dummy_device() to create a dummy device, then calls i2c_smbus_write_byte(). If i2c_smbus_write_byte() fails and returns, the cleanup via devm_add_action_or_reset() was never registered, so the dummy device leaks. Switch to devm_i2c_new_dummy_device() which registers cleanup atomically with device creation, eliminating the error-path window. Fixes: 7501bff87c3e ("iio: light: veml6070: add action for i2c_unregister_device") Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Felix Gu <ustc.gu@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions