summaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorChris Packham <chris.packham@alliedtelesis.co.nz>2017-06-08 09:55:30 +1200
committerBorislav Petkov <bp@suse.de>2017-06-09 11:55:55 +0200
commit3b405e30cbcac3aa327ae04a29e7da5d084a4933 (patch)
tree99a22ecf33ca89eab317d2e69c04cf842ed5de21 /drivers/edac
parentcf97825862f0acd7d6bad67da59962e4badc870a (diff)
downloadlinux-3b405e30cbcac3aa327ae04a29e7da5d084a4933.tar.bz2
EDAC, mv64x60: Sanity check edac_op_state before registering
edac_op_state is a module parameter which affects the behaviour of the driver probe which can potentially be invoked as soon as the platform driver registration happens. Because of this we need to ensure that we sanity check the module parameter before calling platform_register_drivers(). Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/20170607215530.8604-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/mv64x60_edac.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c
index 77bfc3d882a8..d3650df94fe8 100644
--- a/drivers/edac/mv64x60_edac.c
+++ b/drivers/edac/mv64x60_edac.c
@@ -853,11 +853,6 @@ static struct platform_driver * const drivers[] = {
static int __init mv64x60_edac_init(void)
{
- int ret;
-
- ret = platform_register_drivers(drivers, ARRAY_SIZE(drivers));
- if (ret)
- return ret;
printk(KERN_INFO "Marvell MV64x60 EDAC driver " MV64x60_REVISION "\n");
printk(KERN_INFO "\t(C) 2006-2007 MontaVista Software\n");
@@ -872,7 +867,7 @@ static int __init mv64x60_edac_init(void)
break;
}
- return 0;
+ return platform_register_drivers(drivers, ARRAY_SIZE(drivers));
}
module_init(mv64x60_edac_init);