All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH 1/3] serial: 8250_exar: check priv->gpio properly
Date: Tue, 03 Nov 2026 11:20:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-195139@kernel.org> (raw)
In-Reply-To: <28c09cf858795491f66667781bf79fb6a603f159.1793704520.git.jirislaby@kernel.org>

> priv->gpio is set by platform_device_register_full(), which returns
> error-encoded pointers on failure, not NULL. Sashiko reported:
> 
> > Does __xr17v35x_register_gpio() return an ERR_PTR if
> > platform_device_register_full() fails?
> >
> > If it does, we might be storing an error pointer directly into
> > priv->gpio in xr17v35x_register_gpio() without validating it with
> > IS_ERR(). Because the error is ignored, the device probe
> > successfully continues.
> 
> Before commit 1145d1a0703f ("serial: 8250_exar: use
> platform_device_register_full()"), __xr17v35x_register_gpio()
> returned NULL on any failure (platform_device_alloc(),
> device_add_software_node() or platform_device_add() failing were all
> [ ... ]
> priv->gpio never assigned) and failed-registration (ERR_PTR) cases
> are skipped.
> 
> Fixes: 1145d1a0703f ("serial: 8250_exar: use platform_device_register_full()")
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1793704520.git.jirislaby@kernel.org?part=1


  reply	other threads:[~2026-11-03 11:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 11:16 [PATCH 0/3] tty, serial: a couple of unrelated fixes Jiri Slaby (SUSE)
2026-11-03 11:16 ` [PATCH 1/3] serial: 8250_exar: check priv->gpio properly Jiri Slaby (SUSE)
2026-11-03 11:20   ` sashiko-bot [this message]
2026-11-03 11:16 ` [PATCH 2/3] serial: 8250_hp300: reorder HPDCA code Jiri Slaby (SUSE)
2026-11-03 11:20   ` sashiko-bot
2026-11-03 11:16 ` [PATCH 3/3] tty: fix misapplied compat_ptr() in tty_compat_ioctl() Jiri Slaby (SUSE)
2026-11-03 11:19   ` sashiko-bot

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=sashiko-outbox-195139@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.