Upon error, ip175c_set_val() returned 0 instead of -EINVAL.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21711
3c298f89-4303-0410-b956-
a3cf2f4a3e73
static int ip175c_set_val(struct switch_dev *dev, const struct switch_attr *attr, struct switch_val *val)
{
struct ip175c_state *state = dev->priv;
- int myval, err = 0;
+ int myval, err = -EINVAL;
myval = val->value.i;
if (myval <= 0xffff && myval >= 0 && REG_SUPP(state->proc_mii)) {