diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-03-04 17:04:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-12 12:12:13 +0300 |
commit | fe92a949b26400c7f3f2ea53310fd378e57b99ca (patch) | |
tree | b2de479d1798831faa075ac9f68a75e2aa1aa456 /include/linux/fpga/fpga-mgr.h | |
parent | 5c53a28ab253d28853ee3b9b713f9f872b67c2d4 (diff) | |
download | linux-fe92a949b26400c7f3f2ea53310fd378e57b99ca.tar.xz |
iio: core: Leave private pointer NULL when no private data supplied
[ Upstream commit f0245ab389330cbc1d187e358a5b890d9f5383db ]
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: 6d4ebd565d15 ("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>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions