Skip to content

Commit

Permalink
eth: phytmac: phytmac_ioctl: Return -EOPNOTSUPP by default
Browse files Browse the repository at this point in the history
Fix follow error with clang-19:

drivers/net/ethernet/phytium/phytmac_main.c:1818:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
 1818 |         default:
      |         ^~~~~~~
drivers/net/ethernet/phytium/phytmac_main.c:1822:9: note: uninitialized use occurs here
 1822 |         return ret;
      |                ^~~
drivers/net/ethernet/phytium/phytmac_main.c:1799:9: note: initialize the variable 'ret' to silence this warning
 1799 |         int ret;
      |                ^
      |                 = 0
1 error generated.

Signed-off-by: WangYuli <[email protected]>
  • Loading branch information
Avenger-285714 committed Nov 28, 2024
1 parent d2a2df7 commit e7ea92b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/phytium/phytmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,7 @@ static int phytmac_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
break;
#endif
default:
ret = -EOPNOTSUPP;
break;
}

Expand Down

0 comments on commit e7ea92b

Please sign in to comment.