diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2016-09-02 15:45:42 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2016-09-02 15:45:42 +0000 |
commit | 2c6d581511829271c11d81765b9c07cf230c6b9c (patch) | |
tree | 46990429c89297ef8980a7d990a63d4418af8066 | |
parent | 27386e386742c523943caafbb8a0256ea27cb6bf (diff) |
The iwm_poll_bit() function in iwm(4) returns 1 on success, and 0 on failure.
So instead of "if (ret < 0) {" we should check for "if (!ret) {".
Patch by Imre Vadasz
-rw-r--r-- | sys/dev/pci/if_iwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 81eb3a63c3f..5f5ed9c097c 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.100 2016/09/01 09:47:47 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.101 2016/09/02 15:45:41 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -7914,7 +7914,7 @@ iwm_attach(struct device *parent, struct device *self, void *aux) IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); - if (ret < 0) { + if (!ret) { printf("%s: Failed to wake up the nic\n", DEVNAME(sc)); return; } |