Skip to content
Snippets Groups Projects
Commit 25d4abbf authored by Nuno Sá's avatar Nuno Sá Committed by Jonathan Cameron
Browse files

iio: ltc2983: fail probe if no channels are given


If there are no channels defined in the devicetree, there's no point in
probing the device. We were actually requesting a zero sized 'kmalloc'
array but since we were not touching the ZERO_SIZE_PTR afterwards,
nothing bad was actually happening. Hence this is not really a fix but
rather an improvement.

Reviewed-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: default avatarNuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20210825084149.11587-2-nuno.sa@analog.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 919726c9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment