Skip to content

Commit 1350918

Browse files
kartbendkalowsk
authored andcommitted
drivers: gpio: cc23x0: return negative error codes
fixed a couple occurrences of not returning -errno. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent f729420 commit 1350918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpio/gpio_cc23x0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int gpio_cc23x0xx_pin_interrupt_configure(const struct device *port, gpio
180180
enum gpio_int_mode mode, enum gpio_int_trig trig)
181181
{
182182
if (mode == GPIO_INT_MODE_LEVEL) {
183-
return ENOTSUP;
183+
return -ENOTSUP;
184184
}
185185

186186
uint32_t config = GPIOGetConfigDio(IOC_ADDR(pin)) & ~IOC_IOC0_EDGEDET_M;
@@ -205,7 +205,7 @@ static int gpio_cc23x0xx_pin_interrupt_configure(const struct device *port, gpio
205205
config |= IOC_IOC1_EDGEDET_EDGE_BOTH;
206206
break;
207207
default:
208-
return ENOTSUP;
208+
return -ENOTSUP;
209209
}
210210

211211
GPIOSetConfigDio(IOC_ADDR(pin), config);

0 commit comments

Comments
 (0)