mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
EDAC, mv64x60: Check driver registration success
Check the return status of platform_driver_register() in mv64x60_edac_init(). Only output messages and initialise the edac_op_state if the registration is successful. Signed-off-by: Chris Packham <[email protected]> Cc: linux-edac <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Borislav Petkov <[email protected]>
This commit is contained in:
parent
7103de0e58
commit
7d2fdaa694
1 changed files with 7 additions and 2 deletions
|
|
@ -853,10 +853,15 @@ static struct platform_driver * const drivers[] = {
|
|||
|
||||
static int __init mv64x60_edac_init(void)
|
||||
{
|
||||
int ret = 0;
|
||||
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");
|
||||
|
||||
/* make sure error reporting method is sane */
|
||||
switch (edac_op_state) {
|
||||
case EDAC_OPSTATE_POLL:
|
||||
|
|
@ -867,7 +872,7 @@ static int __init mv64x60_edac_init(void)
|
|||
break;
|
||||
}
|
||||
|
||||
return platform_register_drivers(drivers, ARRAY_SIZE(drivers));
|
||||
return 0;
|
||||
}
|
||||
module_init(mv64x60_edac_init);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue