Skip to contentSkip to conversation

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

PATCH In review Chen-Yu Tsai 2 participants 3 messages Jun 28, 2025

Subsystems (3)
lore
Share & tools
lore

Chen-Yu Tsai

author maintainer
#0 lore raw

PATCH 1/1 iio: adc: axp20x_adc: Add missing sentinel to AXP717 ADC channel maps

From: Chen-Yu Tsai <[email protected]>

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")
---
 drivers/iio/adc/axp20x_adc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/axp20x_adc.c +1 -0
index 71584ffd3632..1b49325ec1ce 100644
@@ -187,6 +187,7 @@ static struct iio_map axp717_maps[] = {
 		.consumer_channel = "batt_chrg_i",
 		.adc_channel_label = "batt_chrg_i",
 	},
+	{ }
 };
 
 /*
Signature · 1 line
2.39.5
maintainer
#1 lore raw
Quoted 9 lines · On Sat, 28 Jun 2025 12:43:26 +0800 Chen-Yu Tsai <[email protected]> wrote:

From: Chen-Yu Tsai <[email protected]>

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")

I picked up the version you posted on 7th June.
I've been a bit slow to send a fixed pull request - sorry about that; busy few weeks.

Jonathan

Quoted 16 lines
---
 drivers/iio/adc/axp20x_adc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/axp20x_adc.c +1 -0
index 71584ffd3632..1b49325ec1ce 100644
@@ -187,6 +187,7 @@ static struct iio_map axp717_maps[] = {
 		.consumer_channel = "batt_chrg_i",
 		.adc_channel_label = "batt_chrg_i",
 	},
+	{ }
 };
 
 /*
author maintainer
#2 lore raw
Quoted 9 lines · Jonathan Cameron
Quoted 5 lines · On Sat, 28 Jun 2025 12:43:26 +0800 Chen-Yu Tsai <[email protected]> wrote:

From: Chen-Yu Tsai <[email protected]>

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

Quoted 7 lines
Quoted 4 lines

Add the missing sentinel entry.

Fixes 5ba0cb92584b ("iio: adc: axp20x_adc: add support for AXP717 ADC")

I picked up the version you posted on 7th June.
I've been a bit slow to send a fixed pull request - sorry about that; busy few weeks.

Ah, sorry about that. I was looking through my work directory and trees, didn't find a patch file and thought I hadn't sent it yet.

Good to know it's already queued up.

Thanks
ChenYu

Quoted 20 lines

Jonathan

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