mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 04:59:04 +07:00
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>
This commit is contained in:
parent
9e4aee43dc
commit
bd9a212bab
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user