From: sashiko-bot@kernel.org
To: "Fil Dunsky" <filipp.dunsky@gmail.com>
Cc: devicetree@vger.kernel.org, linux-serial@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v8 07/10] tty: serial: Add Cortina UART driver
Date: Sat, 21 Nov 2026 21:10:49 +0000 [thread overview]
Message-ID: <sashiko-outbox-227384@kernel.org> (raw)
In-Reply-To: <20261122-b4-cs75xx-v8-7-5f971b0dc69c@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] tty: serial: cortina-uart: unsigned port->irq check in
cortina_uart_probe()
--
commit a305c8b2604a8b9812e1e52e3a3c6ade80f87136
Author: Fil Dunsky <filipp.dunsky@gmail.com>
tty: serial: Add Cortina UART driver
This commit adds a serial driver for the UART found in Cortina Systems
CS75xx (Goldengate G2) SoCs, including system console and earlycon
support.
> diff --git a/drivers/tty/serial/cortina-uart.c b/drivers/tty/serial/cortina-uart.c
> new file mode 100644
> index 0000000000000..eb63848f09257
> --- /dev/null
> +++ b/drivers/tty/serial/cortina-uart.c
> @@ -0,0 +1,612 @@
[ ... ]
> +static int cortina_uart_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct cortina_uart_port *up;
> + struct uart_port *port;
> + struct resource *res;
> + int id, ret;
> +
> + up = devm_kzalloc(dev, sizeof(*up), GFP_KERNEL);
> + if (!up)
> + return -ENOMEM;
> +
> + port = &up->port;
> +
> + port->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
> + if (IS_ERR(port->membase))
> + return PTR_ERR(port->membase);
> +
> + port->irq = platform_get_irq(pdev, 0);
> + if (port->irq < 0)
> + return port->irq;
[Severity: Medium]
Does assigning the return value of platform_get_irq() directly to
port->irq prevent error detection here? struct uart_port defines irq as
unsigned int, so port->irq < 0 is always false and negative error codes
such as -EPROBE_DEFER allow probe to succeed with a bogus IRQ number.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261122-b4-cs75xx-v8-0-5f971b0dc69c@gmail.com?part=7
next prev parent reply other threads:[~2026-11-21 21:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 21:01 [PATCH v8 00/10] ARM: Add support for Cortina Systems CS75xx and Securifi Almond+ Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:01 ` [PATCH v8 01/10] dt-bindings: vendor-prefixes: Add Securifi Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:01 ` [PATCH v8 02/10] dt-bindings: arm: Add Cortina Systems CS7542 and Securifi Almond+ Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:01 ` [PATCH v8 03/10] dt-bindings: arm: cpus: Add Cortina Systems CS7542 enable method Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:01 ` [PATCH v8 04/10] ARM: goldengate: Add support for the CS75xx SoC family Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:01 ` [PATCH v8 05/10] ARM: debug: Add Cortina Systems CS75xx UART0 support Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:01 ` [PATCH v8 06/10] dt-bindings: serial: Add Cortina Systems CS7542 UART Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:06 ` sashiko-bot
2026-11-21 21:01 ` [PATCH v8 07/10] tty: serial: Add Cortina UART driver Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:10 ` sashiko-bot [this message]
2026-11-21 21:01 ` [PATCH v8 08/10] ARM: dts: cortina: Add CS7542 SoC and Securifi Almond+ board Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:01 ` [PATCH v8 09/10] ARM: multi_v7_defconfig: Enable Cortina Systems CS75xx support Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:01 ` [PATCH v8 10/10] MAINTAINERS: Add entry for Cortina Systems CS75xx Fil Dunsky
2026-11-21 21:01 ` Fil Dunsky via B4 Relay
2026-11-21 21:10 ` [PATCH v8 00/10] ARM: Add support for Cortina Systems CS75xx and Securifi Almond+ 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-227384@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=filipp.dunsky@gmail.com \
--cc=linux-serial@vger.kernel.org \
--cc=robh@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.