* EDAC: mv64x60: sanity check edac_op_state before registering
@ 2017-06-09 10:01 Borislav Petkov
0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2017-06-09 10:01 UTC (permalink / raw)
To: Chris Packham; +Cc: linux-edac, Mauro Carvalho Chehab, linux-kernel
On Thu, Jun 08, 2017 at 09:55:30AM +1200, Chris Packham wrote:
> 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>
> ---
> drivers/edac/mv64x60_edac.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git#for-next
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
* EDAC: mv64x60: sanity check edac_op_state before registering
@ 2017-06-07 21:55 Chris Packham
0 siblings, 0 replies; 2+ messages in thread
From: Chris Packham @ 2017-06-07 21:55 UTC (permalink / raw)
To: bp, linux-edac; +Cc: Chris Packham, Mauro Carvalho Chehab, linux-kernel
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>
---
drivers/edac/mv64x60_edac.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c
index c83d02a52fd6..9b18a0a606b7 100644
--- a/drivers/edac/mv64x60_edac.c
+++ b/drivers/edac/mv64x60_edac.c
@@ -867,11 +867,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");
@@ -885,7 +880,7 @@ static int __init mv64x60_edac_init(void)
break;
}
- return 0;
+ return platform_register_drivers(drivers, ARRAY_SIZE(drivers));
}
module_init(mv64x60_edac_init);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-09 10:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-09 10:01 EDAC: mv64x60: sanity check edac_op_state before registering Borislav Petkov
-- strict thread matches above, loose matches on Subject: below --
2017-06-07 21:55 Chris Packham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox