gpiolib: remove unnecessary 'out of memory' messages

We don't need to add additional logs when returning -ENOMEM so remove
unnecessary error messages.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
Bartosz Golaszewski
2025-09-22 11:54:02 +02:00
parent 3a86608788
commit 0ba6f1ed38

View File

@@ -2316,10 +2316,8 @@ int gpiochip_add_pingroup_range(struct gpio_chip *gc,
int ret;
pin_range = kzalloc(sizeof(*pin_range), GFP_KERNEL);
if (!pin_range) {
chip_err(gc, "failed to allocate pin ranges\n");
if (!pin_range)
return -ENOMEM;
}
/* Use local offset as range ID */
pin_range->range.id = gpio_offset;
@@ -2379,10 +2377,8 @@ int gpiochip_add_pin_range_with_pins(struct gpio_chip *gc,
int ret;
pin_range = kzalloc(sizeof(*pin_range), GFP_KERNEL);
if (!pin_range) {
chip_err(gc, "failed to allocate pin ranges\n");
if (!pin_range)
return -ENOMEM;
}
/* Use local offset as range ID */
pin_range->range.id = gpio_offset;