mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-01-18 21:00:53 +00:00
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> SVN-Revision: 21711
This commit is contained in:
parent
b3073617a5
commit
7b5a77fa39
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user