hwspinlock: Remove BUG_ON() from the hwspinlock core
authorBaolin Wang <baolin.wang@linaro.org>
Mon, 14 Oct 2019 07:07:43 +0000 (15:07 +0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sat, 9 Nov 2019 00:41:13 +0000 (16:41 -0800)
commitb2547dce4d4a23e8c4a2b0258e3bd31d43dddfad
tree4aeefb6280bd4d08b1a15ce0b47de1b1f5ac4222
parentb674a30bf8b0edf3b966e32dfcb2e00dfca5a823
hwspinlock: Remove BUG_ON() from the hwspinlock core

The original code use BUG_ON() to validate the parameters when locking
or unlocking one hardware lock, but we should not crash the whole kernel
though the hwlock parameters are incorrect, instead we can return
the error number for users and give some warning.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/hwspinlock/hwspinlock_core.c