Skip to content

Commit 97531f8

Browse files
Bartosz Golaszewskigregkh
authored andcommitted
gpiolib: remove unnecessary 'out of memory' messages
[ Upstream commit 0ba6f1e ] 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> Stable-dep-of: a7ac22d ("gpiolib: fix race condition for gdev->srcu") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 75bfb05 commit 97531f8

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

drivers/gpio/gpiolib.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,10 +2316,8 @@ int gpiochip_add_pingroup_range(struct gpio_chip *gc,
23162316
int ret;
23172317

23182318
pin_range = kzalloc(sizeof(*pin_range), GFP_KERNEL);
2319-
if (!pin_range) {
2320-
chip_err(gc, "failed to allocate pin ranges\n");
2319+
if (!pin_range)
23212320
return -ENOMEM;
2322-
}
23232321

23242322
/* Use local offset as range ID */
23252323
pin_range->range.id = gpio_offset;
@@ -2379,10 +2377,8 @@ int gpiochip_add_pin_range_with_pins(struct gpio_chip *gc,
23792377
int ret;
23802378

23812379
pin_range = kzalloc(sizeof(*pin_range), GFP_KERNEL);
2382-
if (!pin_range) {
2383-
chip_err(gc, "failed to allocate pin ranges\n");
2380+
if (!pin_range)
23842381
return -ENOMEM;
2385-
}
23862382

23872383
/* Use local offset as range ID */
23882384
pin_range->range.id = gpio_offset;

0 commit comments

Comments
 (0)