[PATCH] iio: adc: axp20x_adc: Add missing sentinel to AXP717 ADC channel maps

Chen-Yu Tsai posted 1 patch 6 months, 2 weeks ago
There is a newer version of this series
drivers/iio/adc/axp20x_adc.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] iio: adc: axp20x_adc: Add missing sentinel to AXP717 ADC channel maps
Posted by Chen-Yu Tsai 6 months, 2 weeks ago
From: Chen-Yu Tsai <wens@csie.org>

The AXP717 ADC channel maps is missing a sentinel entry at the end. This
causes a KASAN warning.

Add the missing sentinel entry.

Fixes: 5ba0cb92584b ("iio: adc: axp20x_adc: add support for AXP717 ADC")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 drivers/iio/adc/axp20x_adc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/axp20x_adc.c b/drivers/iio/adc/axp20x_adc.c
index 71584ffd3632..1b49325ec1ce 100644
--- a/drivers/iio/adc/axp20x_adc.c
+++ b/drivers/iio/adc/axp20x_adc.c
@@ -187,6 +187,7 @@ static struct iio_map axp717_maps[] = {
 		.consumer_channel = "batt_chrg_i",
 		.adc_channel_label = "batt_chrg_i",
 	},
+	{ }
 };
 
 /*
-- 
2.39.5
Re: [PATCH] iio: adc: axp20x_adc: Add missing sentinel to AXP717 ADC channel maps
Posted by Jonathan Cameron 6 months, 2 weeks ago
On Sat,  7 Jun 2025 21:56:27 +0800
Chen-Yu Tsai <wens@kernel.org> wrote:

> From: Chen-Yu Tsai <wens@csie.org>
> 
> The AXP717 ADC channel maps is missing a sentinel entry at the end. This
> causes a KASAN warning.
> 
> Add the missing sentinel entry.
> 
> Fixes: 5ba0cb92584b ("iio: adc: axp20x_adc: add support for AXP717 ADC")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Applied to my temporary fixes tree.  I'll rebase that on rc1 in next few days.

J
> ---
>  drivers/iio/adc/axp20x_adc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/adc/axp20x_adc.c b/drivers/iio/adc/axp20x_adc.c
> index 71584ffd3632..1b49325ec1ce 100644
> --- a/drivers/iio/adc/axp20x_adc.c
> +++ b/drivers/iio/adc/axp20x_adc.c
> @@ -187,6 +187,7 @@ static struct iio_map axp717_maps[] = {
>  		.consumer_channel = "batt_chrg_i",
>  		.adc_channel_label = "batt_chrg_i",
>  	},
> +	{ }
>  };
>  
>  /*