mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
net: dsa: mv88e6xxx: Fix uninitialised err value
The err value in mv88e6xxx_region_atu_snapshot is now potentially
uninitialised on return. Initialise err as 0.
Fixes: ada5c3229b ("net: dsa: mv88e6xxx: Add FID map cache")
Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241009212319.1045176-1-aryan.srivastava@alliedtelesis.co.nz
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f7cb403e9a
commit
5e7e69baad
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user