summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intersil/prism54
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-12-04 14:19:49 +0100
committerKalle Valo <kvalo@codeaurora.org>2015-12-11 12:22:57 +0100
commitbd9a212bab3db65baff094fe811ef1b593faca2a (patch)
treee0da0eecaec12d056fc204bd7b34b26f62138230 /drivers/net/wireless/intersil/prism54
parenthostap: fix an error code in prism2_config() (diff)
downloadlinux-bd9a212bab3db65baff094fe811ef1b593faca2a.tar.xz
linux-bd9a212bab3db65baff094fe811ef1b593faca2a.zip
prism54: off by one BUG_ON() test
This code was supposed to trigger a BUG() if we truncate the output but it's off by one so it allows one character to be truncated. Really drivers shouldn't call BUG_ON() and especially for something minor like this so I've changed it to a WARN_ON(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intersil/prism54')
-rw-r--r--drivers/net/wireless/intersil/prism54/isl_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intersil/prism54/isl_ioctl.c b/drivers/net/wireless/intersil/prism54/isl_ioctl.c
index ecbb0546cf3e..48e8a978a832 100644
--- a/drivers/net/wireless/intersil/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/intersil/prism54/isl_ioctl.c
@@ -2036,7 +2036,7 @@ format_event(islpci_private *priv, char *dest, const char *str,
mlme->address,
(error ? (mlme->code ? " : REJECTED " : " : ACCEPTED ")
: ""), mlme->code);
- BUG_ON(n > IW_CUSTOM_MAX);
+ WARN_ON(n >= IW_CUSTOM_MAX);
*length = n;
}