Skip to content

Commit 32b0660

Browse files
Sean Andersonkuba-moo
authored andcommitted
net: xilinx: axienet: Use NL_SET_ERR_MSG instead of netdev_err
This error message can be triggered by userspace. Use NL_SET_ERR_MSG so the message is returned to the user and to avoid polluting the kernel logs. Additionally, change the return value from EFAULT to EBUSY to better reflect the error (which has nothing to do with addressing). Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Radhey Shyam Pandey <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 721478f commit 32b0660

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/xilinx/xilinx_axienet_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,9 +1945,9 @@ axienet_ethtools_set_coalesce(struct net_device *ndev,
19451945
struct axienet_local *lp = netdev_priv(ndev);
19461946

19471947
if (netif_running(ndev)) {
1948-
netdev_err(ndev,
1949-
"Please stop netif before applying configuration\n");
1950-
return -EFAULT;
1948+
NL_SET_ERR_MSG(extack,
1949+
"Please stop netif before applying configuration");
1950+
return -EBUSY;
19511951
}
19521952

19531953
if (ecoalesce->rx_max_coalesced_frames)

0 commit comments

Comments
 (0)