Skip to content

Commit

Permalink
team: allow read/write-only options
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jun 19, 2012
1 parent 596e202 commit f82b959
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ static int team_option_get(struct team *team,
struct team_option_inst *opt_inst,
struct team_gsetter_ctx *ctx)
{
if (!opt_inst->option->getter)
return -EOPNOTSUPP;
return opt_inst->option->getter(team, ctx);
}

Expand All @@ -355,6 +357,8 @@ static int team_option_set(struct team *team,
{
int err;

if (!opt_inst->option->setter)
return -EOPNOTSUPP;
err = opt_inst->option->setter(team, ctx);
if (err)
return err;
Expand Down

0 comments on commit f82b959

Please sign in to comment.