Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

plca.c: fix obvious mistake in checking retval

Revert a wrong fix that was done during the review process. The
intention was to substitute "if(ret < 0)" with "if(ret)".
Unfortunately, the intended fix did not meet the code.
Besides, after additional review, it was decided that "if(ret < 0)"
was actually the right thing to do.

Fixes: 8580e16c28f3 ("net/ethtool: add netlink interface for the PLCA RS")
Signed-off-by: Piergiorgio Beruto <piergiorgio.beruto@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/f2277af8951a51cfee2fb905af8d7a812b7beaf4.1673616357.git.piergiorgio.beruto@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Piergiorgio Beruto and committed by
Jakub Kicinski
28dbf774 da1b0b5c

+5 -5
+5 -5
net/ethtool/plca.c
··· 61 61 } 62 62 63 63 ret = ethnl_ops_begin(dev); 64 - if (!ret) 64 + if (ret < 0) 65 65 goto out; 66 66 67 67 memset(&data->plca_cfg, 0xff, ··· 151 151 tb[ETHTOOL_A_PLCA_HEADER], 152 152 genl_info_net(info), info->extack, 153 153 true); 154 - if (!ret) 154 + if (ret < 0) 155 155 return ret; 156 156 157 157 dev = req_info.dev; ··· 171 171 } 172 172 173 173 ret = ethnl_ops_begin(dev); 174 - if (!ret) 174 + if (ret < 0) 175 175 goto out_rtnl; 176 176 177 177 memset(&plca_cfg, 0xff, sizeof(plca_cfg)); ··· 189 189 goto out_ops; 190 190 191 191 ret = ops->set_plca_cfg(dev->phydev, &plca_cfg, info->extack); 192 - if (!ret) 192 + if (ret < 0) 193 193 goto out_ops; 194 194 195 195 ethtool_notify(dev, ETHTOOL_MSG_PLCA_NTF, NULL); ··· 233 233 } 234 234 235 235 ret = ethnl_ops_begin(dev); 236 - if (!ret) 236 + if (ret < 0) 237 237 goto out; 238 238 239 239 memset(&data->plca_st, 0xff,