ip17xx: Fixed error handling in ip175c_set_val()
authorGabor Juhos <juhosg@openwrt.org>
Tue, 8 Jun 2010 20:18:05 +0000 (20:18 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Tue, 8 Jun 2010 20:18:05 +0000 (20:18 +0000)
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>
SVN-Revision: 21711

target/linux/generic-2.6/files/drivers/net/phy/ip175c.c

index 00144e8864275a6a4c4c1771e7cfafe9e780df93..8e1afcd7c23145f1a2705629bf9945a8d4697478 100644 (file)
@@ -947,7 +947,7 @@ static int ip175c_get_val(struct switch_dev *dev, const struct switch_attr *attr
 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)) {