From: Jiri Pirko Date: Tue, 19 Jun 2012 05:54:07 +0000 (+0000) Subject: team: allow read/write-only options X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f82b959d26557fe4ce283d3b27050d4b8268ef1e;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git team: allow read/write-only options Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index dea2d8afa2f..f50b8ca8dc9 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, 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); } @@ -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;