bug: Remove redundant condition check in report_bug
authorAndrew Scull <ascull@google.com>
Thu, 18 Mar 2021 14:33:07 +0000 (14:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:57:32 +0000 (10:57 +0200)
commit92a2ae7160bd36c20f7225a92a6690a74f40a894
treedc63ca890305a5b64e70b1b3eca8dc7553637f65
parent637d2955af13489b23f29614369aa41648d21ccd
bug: Remove redundant condition check in report_bug

[ Upstream commit 3ad1a6cb0abc63d036fc866bd7c2c5983516dec5 ]

report_bug() will return early if it cannot find a bug corresponding to
the provided address. The subsequent test for the bug will always be
true so remove it.

Fixes: 1b4cfe3c0a30d ("lib/bug.c: exclude non-BUG/WARN exceptions from report_bug()")
Signed-off-by: Andrew Scull <ascull@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210318143311.839894-2-ascull@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
lib/bug.c