diff mbox series

[net] net: dsa: uninitialized variable in dsa_slave_netdevice_event()

Message ID Y0l7d6Kcs31oErzx@kili (mailing list archive)
State Accepted
Commit 0a6d58a70a39d9a74882af6d00ec6df0737503ff
Delegated to: Netdev Maintainers
Headers show
Series [net] net: dsa: uninitialized variable in dsa_slave_netdevice_event() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter Oct. 14, 2022, 3:08 p.m. UTC
Return zero if both dsa_slave_dev_check() and netdev_uses_dsa() are false.

Fixes: acc43b7bf52a ("net: dsa: allow masters to join a LAG")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
(Vladimir helped me with this patch)

 net/dsa/slave.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 15, 2022, 10:20 a.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri, 14 Oct 2022 18:08:39 +0300 you wrote:
> Return zero if both dsa_slave_dev_check() and netdev_uses_dsa() are false.
> 
> Fixes: acc43b7bf52a ("net: dsa: allow masters to join a LAG")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> (Vladimir helped me with this patch)
> 
> [...]

Here is the summary with links:
  - [net] net: dsa: uninitialized variable in dsa_slave_netdevice_event()
    https://git.kernel.org/netdev/net/c/0a6d58a70a39

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 1a59918d3b30..a9fde48cffd4 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -3145,7 +3145,7 @@  static int dsa_slave_netdevice_event(struct notifier_block *nb,
 	case NETDEV_CHANGELOWERSTATE: {
 		struct netdev_notifier_changelowerstate_info *info = ptr;
 		struct dsa_port *dp;
-		int err;
+		int err = 0;
 
 		if (dsa_slave_dev_check(dev)) {
 			dp = dsa_slave_to_port(dev);