From: Chris Packham <chris.packham@alliedtelesis.co.nz>
To: bp@alien8.de, linux-edac@vger.kernel.org
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-kernel@vger.kernel.org
Subject: EDAC: mv64x60: sanity check edac_op_state before registering
Date: Thu, 8 Jun 2017 09:55:30 +1200 [thread overview]
Message-ID: <20170607215530.8604-1-chris.packham@alliedtelesis.co.nz> (raw)
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);
next reply other threads:[~2017-06-07 21:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 21:55 Chris Packham [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-06-09 10:01 EDAC: mv64x60: sanity check edac_op_state before registering Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170607215530.8604-1-chris.packham@alliedtelesis.co.nz \
--to=chris.packham@alliedtelesis.co.nz \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox