Skip to content

Commit 8409e42

Browse files
cfriedtnashif
authored andcommitted
drivers: gpio: pca series: dereference pointer in assignment
Properly dereference the value pointer in assignment. ``` In function 'gpio_pca_series_port_read_standard': warning: assignment to 'gpio_port_value_t *' {aka 'unsigned int *'} \ from 'uint32_t' {aka 'unsigned int'} makes pointer from integer \ without a cast [-Wint-conversion] 1071 | value = sys_le32_to_cpu(input_data); | ^ ``` Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
1 parent 3124c7a commit 8409e42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpio_pca_series.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ static int gpio_pca_series_port_read_standard(
10681068
if (ret) {
10691069
LOG_ERR("port read error %d", ret);
10701070
} else {
1071-
value = sys_le32_to_cpu(input_data);
1071+
*value = (gpio_port_value_t)sys_le32_to_cpu(input_data);
10721072
}
10731073
k_sem_give(&data->lock);
10741074
#endif /* CONFIG_GPIO_PCA_SERIES_INTERRUPT */

0 commit comments

Comments
 (0)