mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-17 17:47:28 +00:00
rv: Return init error when registering monitors
Monitors generated with dot2k have their registration function (the one called during monitor initialisation) return always 0, even if the registration failed on RV side. This can hide potential errors. Return the value returned by the RV register function. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Tomas Glozar <tglozar@redhat.com> Cc: Juri Lelli <jlelli@redhat.com> Cc: Clark Williams <williams@redhat.com> Cc: John Kacur <jkacur@redhat.com> Link: https://lore.kernel.org/20250723161240.194860-6-gmonaco@redhat.com Reviewed-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
parent
560473f2e2
commit
58d5f0d437
@ -21,8 +21,7 @@ struct rv_monitor rv_sched = {
|
||||
|
||||
static int __init register_sched(void)
|
||||
{
|
||||
rv_register_monitor(&rv_sched, NULL);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_sched, NULL);
|
||||
}
|
||||
|
||||
static void __exit unregister_sched(void)
|
||||
|
@ -71,8 +71,7 @@ static struct rv_monitor rv_sco = {
|
||||
|
||||
static int __init register_sco(void)
|
||||
{
|
||||
rv_register_monitor(&rv_sco, &rv_sched);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_sco, &rv_sched);
|
||||
}
|
||||
|
||||
static void __exit unregister_sco(void)
|
||||
|
@ -79,8 +79,7 @@ static struct rv_monitor rv_scpd = {
|
||||
|
||||
static int __init register_scpd(void)
|
||||
{
|
||||
rv_register_monitor(&rv_scpd, &rv_sched);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_scpd, &rv_sched);
|
||||
}
|
||||
|
||||
static void __exit unregister_scpd(void)
|
||||
|
@ -79,8 +79,7 @@ static struct rv_monitor rv_sncid = {
|
||||
|
||||
static int __init register_sncid(void)
|
||||
{
|
||||
rv_register_monitor(&rv_sncid, &rv_sched);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_sncid, &rv_sched);
|
||||
}
|
||||
|
||||
static void __exit unregister_sncid(void)
|
||||
|
@ -79,8 +79,7 @@ static struct rv_monitor rv_snep = {
|
||||
|
||||
static int __init register_snep(void)
|
||||
{
|
||||
rv_register_monitor(&rv_snep, &rv_sched);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_snep, &rv_sched);
|
||||
}
|
||||
|
||||
static void __exit unregister_snep(void)
|
||||
|
@ -68,8 +68,7 @@ static struct rv_monitor rv_snroc = {
|
||||
|
||||
static int __init register_snroc(void)
|
||||
{
|
||||
rv_register_monitor(&rv_snroc, &rv_sched);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_snroc, &rv_sched);
|
||||
}
|
||||
|
||||
static void __exit unregister_snroc(void)
|
||||
|
@ -74,8 +74,7 @@ static struct rv_monitor rv_tss = {
|
||||
|
||||
static int __init register_tss(void)
|
||||
{
|
||||
rv_register_monitor(&rv_tss, &rv_sched);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_tss, &rv_sched);
|
||||
}
|
||||
|
||||
static void __exit unregister_tss(void)
|
||||
|
@ -71,8 +71,7 @@ static struct rv_monitor rv_wip = {
|
||||
|
||||
static int __init register_wip(void)
|
||||
{
|
||||
rv_register_monitor(&rv_wip, NULL);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_wip, NULL);
|
||||
}
|
||||
|
||||
static void __exit unregister_wip(void)
|
||||
|
@ -70,8 +70,7 @@ static struct rv_monitor rv_wwnr = {
|
||||
|
||||
static int __init register_wwnr(void)
|
||||
{
|
||||
rv_register_monitor(&rv_wwnr, NULL);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_wwnr, NULL);
|
||||
}
|
||||
|
||||
static void __exit unregister_wwnr(void)
|
||||
|
@ -21,8 +21,7 @@ struct rv_monitor rv_%%MODEL_NAME%% = {
|
||||
|
||||
static int __init register_%%MODEL_NAME%%(void)
|
||||
{
|
||||
rv_register_monitor(&rv_%%MODEL_NAME%%, NULL);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_%%MODEL_NAME%%, NULL);
|
||||
}
|
||||
|
||||
static void __exit unregister_%%MODEL_NAME%%(void)
|
||||
|
@ -74,8 +74,7 @@ static struct rv_monitor rv_%%MODEL_NAME%% = {
|
||||
|
||||
static int __init register_%%MODEL_NAME%%(void)
|
||||
{
|
||||
rv_register_monitor(&rv_%%MODEL_NAME%%, %%PARENT%%);
|
||||
return 0;
|
||||
return rv_register_monitor(&rv_%%MODEL_NAME%%, %%PARENT%%);
|
||||
}
|
||||
|
||||
static void __exit unregister_%%MODEL_NAME%%(void)
|
||||
|
Loading…
Reference in New Issue
Block a user