Merge tag 'char-misc-5.13-rc1-round2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / kernel / static_call.c
index 2c5950b..723fcc9 100644 (file)
@@ -165,13 +165,13 @@ void __static_call_update(struct static_call_key *key, void *tramp, void *func)
 
                stop = __stop_static_call_sites;
 
-#ifdef CONFIG_MODULES
                if (mod) {
+#ifdef CONFIG_MODULES
                        stop = mod->static_call_sites +
                               mod->num_static_call_sites;
                        init = mod->state == MODULE_STATE_COMING;
-               }
 #endif
+               }
 
                for (site = site_mod->sites;
                     site < stop && static_call_key(site) == key; site++) {