aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2012-06-19 01:54:07 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-19 18:00:23 -0400
commitf82b959d26557fe4ce283d3b27050d4b8268ef1e (patch)
tree692ae82da402951d5f429ad95ff5fd6dcaf863c0 /drivers/net/team
parent596e2024c42159fedf71b3d17fba78eed9b5bf10 (diff)
team: allow read/write-only options
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team')
-rw-r--r--drivers/net/team/team.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index dea2d8afa2f4..f50b8ca8dc94 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -346,6 +346,8 @@ static int team_option_get(struct team *team,
346 struct team_option_inst *opt_inst, 346 struct team_option_inst *opt_inst,
347 struct team_gsetter_ctx *ctx) 347 struct team_gsetter_ctx *ctx)
348{ 348{
349 if (!opt_inst->option->getter)
350 return -EOPNOTSUPP;
349 return opt_inst->option->getter(team, ctx); 351 return opt_inst->option->getter(team, ctx);
350} 352}
351 353
@@ -355,6 +357,8 @@ static int team_option_set(struct team *team,
355{ 357{
356 int err; 358 int err;
357 359
360 if (!opt_inst->option->setter)
361 return -EOPNOTSUPP;
358 err = opt_inst->option->setter(team, ctx); 362 err = opt_inst->option->setter(team, ctx);
359 if (err) 363 if (err)
360 return err; 364 return err;