EDAC/mc: Do not BUG_ON() in edac_mc_alloc()
authorRobert Richter <rrichter@marvell.com>
Wed, 6 Nov 2019 09:33:09 +0000 (09:33 +0000)
committerBorislav Petkov <bp@suse.de>
Sun, 10 Nov 2019 11:40:14 +0000 (12:40 +0100)
commitd260e8ff5195d3080cc11ae1f35cf4e6eb1a5d24
tree88439ccc108c6c58d797d33dbe3aae011e4608f9
parentc498afaf7df87f44e7cb383c135baec52b5259be
EDAC/mc: Do not BUG_ON() in edac_mc_alloc()

No need to crash the system in case edac_mc_alloc() is called with
invalid arguments, just warn and return. This would cause a checkpatch
warning when touching the code later, so just fix it.

Signed-off-by: Robert Richter <rrichter@marvell.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/20191106093239.25517-5-rrichter@marvell.com
drivers/edac/edac_mc.c