diff options
| author | Dan Carpenter <dan.carpenter@linaro.org> | 2025-10-24 14:23:35 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-10-27 18:03:30 -0700 |
| commit | 05e090620bacf317020f9591cfff8926093380bd (patch) | |
| tree | 85b4a2445601e685db9fcb1e766ebe2ca580292c /net/switchdev/switchdev.c | |
| parent | bbfa5e7c8d1784d6a181fc83f30c3d72ea720725 (diff) | |
net: airoha: Fix a copy and paste bug in probe()
This code has a copy and paste bug where it accidentally checks "if (err)"
instead of checking if "xsi_rsts" is NULL. Also, as a free bonus, I
changed the allocation from kzalloc() to kcalloc() which is a kernel
hardening measure to protect against integer overflows.
Fixes: 5863b4e065e2 ("net: airoha: Add airoha_eth_soc_data struct")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/aPtht6y5DRokn9zv@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
