summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2017-10-18 12:48:54 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2017-10-18 12:48:54 +0000
commit23be4ac78cbbf3c75d2fcbe3ed0239098f0d7295 (patch)
treed232abd3e6765bf2e7a03c14f5e9f20e026cddec /sys/dev/ic
parent0f4877b75b69a992886975fa26e1eb872a50286b (diff)
Revert previous commit, since not all interfaces behaved the same.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/bwfm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c
index a4e4c76a862..67823eeb44f 100644
--- a/sys/dev/ic/bwfm.c
+++ b/sys/dev/ic/bwfm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwfm.c,v 1.6 2017/10/18 12:33:25 patrick Exp $ */
+/* $OpenBSD: bwfm.c,v 1.7 2017/10/18 12:48:53 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se>
@@ -1183,8 +1183,7 @@ bwfm_fwvar_cmd_get_int(struct bwfm_softc *sc, int cmd, uint32_t *data)
{
int ret;
ret = bwfm_fwvar_cmd_get_data(sc, cmd, data, sizeof(*data));
- if (!ret)
- *data = letoh32(*data);
+ *data = letoh32(*data);
return ret;
}
@@ -1206,8 +1205,7 @@ bwfm_fwvar_var_get_data(struct bwfm_softc *sc, char *name, void *data, size_t le
memcpy(buf + strlen(name) + 1, data, len);
ret = bwfm_fwvar_cmd_get_data(sc, BWFM_C_GET_VAR,
buf, strlen(name) + 1 + len);
- if (!ret)
- memcpy(data, buf, len);
+ memcpy(data, buf, len);
free(buf, M_TEMP, strlen(name) + 1 + len);
return ret;
}