mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-24 19:10:26 +00:00
iio: core: Leave private pointer NULL when no private data supplied
[ Upstream commitf0245ab389] In iio_device_alloc() when size of the private data is 0, the private pointer is calculated to point behind the valid data. Leave it NULL when no private data supplied. Fixes:6d4ebd565d("iio: core: wrap IIO device into an iio_dev_opaque object") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://lore.kernel.org/r/20240304140650.977784-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5c53a28ab2
commit
fe92a949b2
1 changed files with 4 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue