mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user