From: Jiri Slaby <jirislaby@kernel.org>
To: Hugo Villeneuve <hugo@hugovil.com>,
gregkh@linuxfoundation.org, fvallee@eukrea.fr
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
Hugo Villeneuve <hvilleneuve@dimonoff.com>
Subject: Re: [PATCH 06/15] serial: sc16is7xx: use dev_err_probe() instead of dev_err()
Date: Mon, 29 Sep 2025 08:10:17 +0200 [thread overview]
Message-ID: <a7fe7f1e-df3f-4823-a19c-b581e8bb0eea@kernel.org> (raw)
In-Reply-To: <20250924153740.806444-7-hugo@hugovil.com>
On 24. 09. 25, 17:37, Hugo Villeneuve wrote:
> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
>
> This simplifies code and standardizes the error output.
>
> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> ---
> drivers/tty/serial/sc16is7xx.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
> index 7af09535a1563..4384804a4e228 100644
> --- a/drivers/tty/serial/sc16is7xx.c
> +++ b/drivers/tty/serial/sc16is7xx.c
> @@ -1528,10 +1528,9 @@ int sc16is7xx_probe(struct device *dev, const struct sc16is7xx_devtype *devtype,
>
> /* Alloc port structure */
> s = devm_kzalloc(dev, struct_size(s, p, devtype->nr_uart), GFP_KERNEL);
> - if (!s) {
> - dev_err(dev, "Error allocating port structure\n");
> - return -ENOMEM;
> - }
> + if (!s)
> + return dev_err_probe(dev, -ENOMEM,
> + "Error allocating port structure\n");
This does not work as you'd expect:
case -ENOMEM:
/* Don't print anything on -ENOMEM, there's already
enough output */
break;
thanks,
--
js
suse labs
next prev parent reply other threads:[~2025-09-29 6:10 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 15:37 [PATCH 00/15] serial: sc16is7xx: register access fixes and improvements Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 01/15] serial: sc16is7xx: remove useless enable of enhanced features Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 02/15] serial: sc16is7xx: rename LCR macros to better reflect usage Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 03/15] serial: sc16is7xx: rename EFR mutex with generic name Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 04/15] serial: sc16is7xx: define common register access function Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 05/15] serial: sc16is7xx: use guards for simple mutex locks Hugo Villeneuve
2025-09-29 6:09 ` Jiri Slaby
2025-09-30 0:27 ` Hugo Villeneuve
2025-09-30 4:01 ` Jiri Slaby
2025-09-30 13:57 ` Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 06/15] serial: sc16is7xx: use dev_err_probe() instead of dev_err() Hugo Villeneuve
2025-09-29 6:10 ` Jiri Slaby [this message]
2025-09-30 0:32 ` Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 07/15] serial: sc16is7xx: declare SPR/TLR/XOFF2 register as volatile Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 08/15] serial: sc16is7xx: move port/channel init to separate function Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 09/15] serial: sc16is7xx: Kconfig: allow building with COMPILE_TEST Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 10/15] serial: sc16is7xx: use KBUILD_MODNAME Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 11/15] serial: sc16is7xx: remove empty line Hugo Villeneuve
2025-09-29 6:14 ` Jiri Slaby
2025-09-30 0:53 ` Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 12/15] serial: sc16is7xx: add missing space between macro args (checkpatch) Hugo Villeneuve
2025-09-29 6:15 ` Jiri Slaby
2025-09-30 20:08 ` Hugo Villeneuve
2025-10-01 5:16 ` Greg KH
2025-10-01 13:29 ` Hugo Villeneuve
2025-10-02 5:24 ` Greg KH
2025-09-24 15:37 ` [PATCH 13/15] serial: sc16is7xx: change incorrect indentation Hugo Villeneuve
2025-09-26 9:18 ` Maarten Brock
2025-09-26 16:11 ` Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 14/15] serial: sc16is7xx: reformat comments Hugo Villeneuve
2025-09-29 6:18 ` Jiri Slaby
2025-09-30 19:42 ` Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 15/15] serial: sc16is7xx: add/improve comments Hugo Villeneuve
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=a7fe7f1e-df3f-4823-a19c-b581e8bb0eea@kernel.org \
--to=jirislaby@kernel.org \
--cc=fvallee@eukrea.fr \
--cc=gregkh@linuxfoundation.org \
--cc=hugo@hugovil.com \
--cc=hvilleneuve@dimonoff.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@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
all inboxes | Powered by JetHome®