macintosh/via-macii: Remove BUG_ON assertions
[ Upstream commit 5f93d7081a47e1972031ccf57c4b2779eee162fb ]
The BUG_ON assertions I added to the via-macii driver over a decade ago
haven't fired AFAIK. Some can never fire (by inspection). One assertion
checks for a NULL pointer, but that would merely substitute a BUG crash
for an Oops crash. Remove the pointless BUG_ON assertions and replace
the others with a WARN_ON and an array bounds check.
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Stable-dep-of: d301a71c76ee ("macintosh/via-macii: Fix "BUG: sleeping function called from invalid context"")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 880897e8a5ade054a04575e5d8cc2666da415ab4)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
1 file changed