netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v0] net: dsa: mv88e6xxx: Fix uninitialised err value
@ 2024-10-09 21:23 Aryan Srivastava
  2024-10-09 21:27 ` Andrew Lunn
  2024-10-11 22:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Aryan Srivastava @ 2024-10-09 21:23 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Aryan Srivastava, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel

The err value in mv88e6xxx_region_atu_snapshot is now potentially
uninitialised on return. Initialise err as 0.

Fixes: ada5c3229b32 ("net: dsa: mv88e6xxx: Add FID map cache")
Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz>
---
 drivers/net/dsa/mv88e6xxx/devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/devlink.c b/drivers/net/dsa/mv88e6xxx/devlink.c
index ef3643bc43db..795c8df7b6a7 100644
--- a/drivers/net/dsa/mv88e6xxx/devlink.c
+++ b/drivers/net/dsa/mv88e6xxx/devlink.c
@@ -376,7 +376,7 @@ static int mv88e6xxx_region_atu_snapshot(struct devlink *dl,
 	struct dsa_switch *ds = dsa_devlink_to_ds(dl);
 	struct mv88e6xxx_devlink_atu_entry *table;
 	struct mv88e6xxx_chip *chip = ds->priv;
-	int fid = -1, count, err;
+	int fid = -1, err = 0, count;
 
 	table = kmalloc_array(mv88e6xxx_num_databases(chip),
 			      sizeof(struct mv88e6xxx_devlink_atu_entry),
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v0] net: dsa: mv88e6xxx: Fix uninitialised err value
  2024-10-09 21:23 [PATCH net-next v0] net: dsa: mv88e6xxx: Fix uninitialised err value Aryan Srivastava
@ 2024-10-09 21:27 ` Andrew Lunn
  2024-10-11 22:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2024-10-09 21:27 UTC (permalink / raw)
  To: Aryan Srivastava
  Cc: Florian Fainelli, Vladimir Oltean, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel

On Thu, Oct 10, 2024 at 10:23:19AM +1300, Aryan Srivastava wrote:
> The err value in mv88e6xxx_region_atu_snapshot is now potentially
> uninitialised on return. Initialise err as 0.
> 
> Fixes: ada5c3229b32 ("net: dsa: mv88e6xxx: Add FID map cache")
> Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz>

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

    Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v0] net: dsa: mv88e6xxx: Fix uninitialised err value
  2024-10-09 21:23 [PATCH net-next v0] net: dsa: mv88e6xxx: Fix uninitialised err value Aryan Srivastava
  2024-10-09 21:27 ` Andrew Lunn
@ 2024-10-11 22:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-11 22:50 UTC (permalink / raw)
  To: Aryan Srivastava
  Cc: andrew, f.fainelli, olteanv, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 10 Oct 2024 10:23:19 +1300 you wrote:
> The err value in mv88e6xxx_region_atu_snapshot is now potentially
> uninitialised on return. Initialise err as 0.
> 
> Fixes: ada5c3229b32 ("net: dsa: mv88e6xxx: Add FID map cache")
> Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz>
> ---
>  drivers/net/dsa/mv88e6xxx/devlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [net-next,v0] net: dsa: mv88e6xxx: Fix uninitialised err value
    https://git.kernel.org/netdev/net-next/c/5e7e69baaded

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-11 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09 21:23 [PATCH net-next v0] net: dsa: mv88e6xxx: Fix uninitialised err value Aryan Srivastava
2024-10-09 21:27 ` Andrew Lunn
2024-10-11 22:50 ` patchwork-bot+netdevbpf

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).