summaryrefslogtreecommitdiff
path: root/net/ethtool
diff options
context:
space:
mode:
Diffstat (limited to 'net/ethtool')
-rw-r--r--net/ethtool/ioctl.c3
-rw-r--r--net/ethtool/mm.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index 39ec920f5de7..71c828d0bf31 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -1083,7 +1083,8 @@ static noinline_for_stack int ethtool_set_rxnfc(struct net_device *dev,
ethtool_get_flow_spec_ring(info.fs.ring_cookie))
return -EINVAL;
- if (!xa_load(&dev->ethtool->rss_ctx, info.rss_context))
+ if (info.rss_context &&
+ !xa_load(&dev->ethtool->rss_ctx, info.rss_context))
return -EINVAL;
}
diff --git a/net/ethtool/mm.c b/net/ethtool/mm.c
index ad9b40034003..29bbbc149375 100644
--- a/net/ethtool/mm.c
+++ b/net/ethtool/mm.c
@@ -315,7 +315,7 @@ static void ethtool_mmsv_send_mpacket(struct ethtool_mmsv *mmsv,
*/
static void ethtool_mmsv_verify_timer(struct timer_list *t)
{
- struct ethtool_mmsv *mmsv = from_timer(mmsv, t, verify_timer);
+ struct ethtool_mmsv *mmsv = timer_container_of(mmsv, t, verify_timer);
unsigned long flags;
bool rearm = false;