Re: [PATCH] RAS/CEC: Fix cec_init prototype

From: Borislav Petkov
Date: Wed Aug 05 2020 - 01:00:33 EST


On Tue, Aug 04, 2020 at 06:18:47PM +0200, Luca Stefani wrote:
> * late_initcall expects a function to return an integer

Please write a proper sentence for a commit message.

> Signed-off-by: Luca Stefani <luca.stefani.ge1@xxxxxxxxx>
> ---
> drivers/ras/cec.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c
> index 569d9ad2c594..e048e0e3949a 100644
> --- a/drivers/ras/cec.c
> +++ b/drivers/ras/cec.c
> @@ -553,20 +553,20 @@ static struct notifier_block cec_nb = {
> .priority = MCE_PRIO_CEC,
> };
>
> -static void __init cec_init(void)
> +static int __init cec_init(void)
> {
> if (ce_arr.disabled)
> - return;
> + return 0;

Why 0?

I'm thinking all the cases when the init doesn't succeed should return
!0...

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette