aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-06-08 20:18:05 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-06-08 20:18:05 +0000
commit0bff315185da58d5484ee47f10469ffd1721b385 (patch)
treefef57a9569e792db209cf276d97631f51d06a406
parentb9eb7def42ccec2f790118e3d6b6f538d88b9f74 (diff)
downloadupstream-0bff315185da58d5484ee47f10469ffd1721b385.tar.gz
upstream-0bff315185da58d5484ee47f10469ffd1721b385.tar.bz2
upstream-0bff315185da58d5484ee47f10469ffd1721b385.zip
ip17xx: Fixed error handling in ip175c_set_val()
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
-rw-r--r--target/linux/generic-2.6/files/drivers/net/phy/ip175c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c b/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c
index 00144e8864..8e1afcd7c2 100644
--- a/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c
+++ b/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c
@@ -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)) {