mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Bastien Curutchet (Schneider Electric)" <bastien.curutchet@bootlin.com>
Cc: "Woojung Huh" <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Richard Cochran" <richardcochran@gmail.com>,
	"Arun Ramadoss" <arun.ramadoss@microchip.com>,
	"Pascal Eberhard" <pascal.eberhard@se.com>,
	"Miquèl Raynal" <miquel.raynal@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v3 2/4] net: dsa: microchip: ptp: Fix checks on irq_find_mapping()
Date: Fri, 14 Nov 2025 15:51:31 +0100	[thread overview]
Message-ID: <7909a98c-7ef6-4902-a1b4-c2caba47a086@lunn.ch> (raw)
In-Reply-To: <20251114-ksz-fix-v3-2-acbb3b9cc32f@bootlin.com>

On Fri, Nov 14, 2025 at 08:20:21AM +0100, Bastien Curutchet (Schneider Electric) wrote:
> irq_find_mapping() returns a positive IRQ number or 0 if no IRQ is found
> but it never returns a negative value. However, during the PTP IRQ setup,
> we verify that its returned value isn't negative.
> 
> Fix the irq_find_mapping() check to enter the error path when 0 is
> returned. Return -EINVAL in such case.
> 
> Fixes: cc13ab18b201 ("net: dsa: microchip: ptp: enable interrupt for timestamping")
> Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2025-11-14 14:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14  7:20 [PATCH net v3 0/4] net: dsa: microchip: Fix resource releases in error path Bastien Curutchet (Schneider Electric)
2025-11-14  7:20 ` [PATCH net v3 1/4] net: dsa: microchip: common: Fix checks on irq_find_mapping() Bastien Curutchet (Schneider Electric)
2025-11-14 14:51   ` Andrew Lunn
2025-11-14  7:20 ` [PATCH net v3 2/4] net: dsa: microchip: ptp: " Bastien Curutchet (Schneider Electric)
2025-11-14 14:51   ` Andrew Lunn [this message]
2025-11-14  7:20 ` [PATCH net v3 3/4] net: dsa: microchip: Ensure a ksz_irq is initialized before freeing it Bastien Curutchet (Schneider Electric)
2025-11-14 15:00   ` Andrew Lunn
2025-11-17  8:51     ` Bastien Curutchet
2025-11-14  7:20 ` [PATCH net v3 4/4] net: dsa: microchip: Immediately assing IRQ numbers Bastien Curutchet (Schneider Electric)
2025-11-14 15:11   ` Andrew Lunn

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=7909a98c-7ef6-4902-a1b4-c2caba47a086@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=arun.ramadoss@microchip.com \
    --cc=bastien.curutchet@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=pascal.eberhard@se.com \
    --cc=richardcochran@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=woojung.huh@microchip.com \
    /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®