summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/sched/cls_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index dd711ae048ff..d8a22bedd026 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3517,11 +3517,13 @@ static int tc_setup_offload_act(struct tc_action *act,
struct netlink_ext_ack *extack)
{
#ifdef CONFIG_NET_CLS_ACT
- if (act->ops->offload_act_setup)
+ if (act->ops->offload_act_setup) {
return act->ops->offload_act_setup(act, entry, index_inc, true,
extack);
- else
+ } else {
+ NL_SET_ERR_MSG(extack, "Action does not support offload");
return -EOPNOTSUPP;
+ }
#else
return 0;
#endif