lkml.org 
[lkml]   [2016]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] devlink: clean up a condition
Presumably having a _get() function implies that we also have a _set()
function but lets make it match when we're calling.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/net/core/devlink.c b/net/core/devlink.c
index a4f88cb..b2e592a 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -1461,7 +1461,7 @@ static int devlink_nl_cmd_eswitch_mode_set_doit(struct sk_buff *skb,

mode = nla_get_u16(info->attrs[DEVLINK_ATTR_ESWITCH_MODE]);

- if (ops && ops->eswitch_mode_get)
+ if (ops && ops->eswitch_mode_set)
return ops->eswitch_mode_set(devlink, mode);
return -EOPNOTSUPP;
}
\
 
 \ /
  Last update: 2016-06-16 09:21    [W:0.035 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site