aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2007-04-02 14:10:39 +0200
committerGuido Guenther <agx@bogon.sigxcpu.org>2007-04-02 14:17:58 +0200
commit59e1db7537dc8468be91daad596a045213725286 (patch)
tree87467811fafa6cfaae90c36c76b8aef4286db7c9
parente7d3ff24b32a6ab060fa80dc063ceba354cb7972 (diff)
at76_set_mib: don't return arbitrarily chosen error numbers
-rw-r--r--at76_usb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/at76_usb.c b/at76_usb.c
index 05c1c80..67e00af 100644
--- a/at76_usb.c
+++ b/at76_usb.c
@@ -915,13 +915,14 @@ static int set_mib(struct at76c503 *dev, struct set_mib_buffer *buf)
if ((ret = at76_wait_completion(dev, CMD_SET_MIB)) !=
CMD_STATUS_COMPLETE) {
info("%s: set_mib: at76_wait_completion failed with %d", dev->netdev->name, ret);
- ret = -156; /* ??? */
+ ret = -EIO;
}
kfree(cmd_buf);
return ret;
- }
+ } else
+ ret = -ENOMEM;
- return -ENOMEM;
+ return ret;
}
/* return < 0 on error, == 0 if no command sent, == 1 if cmd sent */