]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bus: del unnecessary init var
authorLi Jun <lijun01@kylinos.cn>
Wed, 4 Jun 2025 08:17:12 +0000 (16:17 +0800)
committerArnd Bergmann <arnd@arndb.de>
Tue, 22 Jul 2025 20:23:07 +0000 (22:23 +0200)
The compiler generates initialization instructions,
which consume additional CPU cycles. the
sysc_clockdomain_init should assign a value
to 'error' before it is read.so the var don't need init
to 0.

Signed-off-by: Li Jun <lijun01@kylinos.cn>
Link: https://lore.kernel.org/r/20250604081712.119523-1-lijun01@kylinos.cn
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/bus/ti-sysc.c

index 9f624e5da9916eb73876cb6f96e92bdef7877a2a..5566ad11399e7e37b9b2447038140615856dfa0f 100644 (file)
@@ -2170,9 +2170,8 @@ static int sysc_reset(struct sysc *ddata)
 static int sysc_init_module(struct sysc *ddata)
 {
        bool rstctrl_deasserted = false;
-       int error = 0;
+       int error = sysc_clockdomain_init(ddata);
 
-       error = sysc_clockdomain_init(ddata);
        if (error)
                return error;