From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [PATCH 1/4] gpiolib: remove unnecessary 'out of memory' messages
Date: Mon, 22 Sep 2025 11:54:02 +0200 [thread overview]
Message-ID: <20250922-gpio-debug-macros-v1-1-d99739dff711@linaro.org> (raw)
In-Reply-To: <20250922-gpio-debug-macros-v1-0-d99739dff711@linaro.org>
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
We don't need to add additional logs when returning -ENOMEM so remove
unnecessary error messages.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/gpiolib.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 01bdf8fad7cff6c507e79b8880e9335d7ee53173..0bc2363e71a488a9c21b3da59821e04bc08be69d 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -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;
--
2.48.1
next prev parent reply other threads:[~2025-09-22 9:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 9:54 [PATCH 0/4] gpio: rework debug macros Bartosz Golaszewski
2025-09-22 9:54 ` Bartosz Golaszewski [this message]
2025-09-22 9:54 ` [PATCH 2/4] gpiolib: rename GPIO chip printk macros Bartosz Golaszewski
2025-09-22 9:54 ` [PATCH 3/4] gpiolib: reuse macro code in GPIO descriptor printk helpers Bartosz Golaszewski
2025-09-22 9:54 ` [PATCH 4/4] gpiolib: reuse macro code in GPIO chip " Bartosz Golaszewski
2025-10-01 6:39 ` [PATCH 0/4] gpio: rework debug macros Linus Walleij
2025-10-13 7:56 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250922-gpio-debug-macros-v1-1-d99739dff711@linaro.org \
--to=brgl@bgdev.pl \
--cc=bartosz.golaszewski@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).