staging: speakup: Replace BUG_ON() with WARN_ON().
authorVarsha Rao <rvarsha016@gmail.com>
Sat, 25 Feb 2017 12:23:58 +0000 (17:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:05 +0000 (09:17 +0100)
commitd351c2db5420bb17dcd2d9aac7ddb5f64c6d04b3
treea8cc6b9726c24fb311355936f5c346e0496b7ff4
parentec72ba7bffdf98e1e53ad168259cd78cd48af3b5
staging: speakup: Replace BUG_ON() with WARN_ON().

BUG_ON() is replaced with WARN_ON() and EINVAL is returned, when
WARN_ON() is true. This fixes the following checkpatch issue:

Avoid crashing the kernel - try using WARN_ON & recovery code rather
than BUG() or BUG_ON().

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/kobjects.c