diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-03-04 16:04:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-12 11:39:05 +0200 |
commit | affdf720b62bdf32d1401842ac5a4fc7554bc076 (patch) | |
tree | 231ee319c7af082205da29c475a86b3499ccb658 /drivers/fpga/fpga-bridge.c | |
parent | 62bf20dea38c478cadac060c8178b549ed7c482a (diff) |
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 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions