]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/xen/tmem.c
Merge branch 'pm-assorted'
[karo-tx-linux.git] / drivers / xen / tmem.c
index cc072c66c766523e4191c5cf4cd40762b77645a9..0f0493c633717ae4814162f645406db15e16d54e 100644 (file)
@@ -379,10 +379,10 @@ static int xen_tmem_init(void)
 #ifdef CONFIG_FRONTSWAP
        if (tmem_enabled && frontswap) {
                char *s = "";
-               struct frontswap_ops *old_ops =
-                       frontswap_register_ops(&tmem_frontswap_ops);
+               struct frontswap_ops *old_ops;
 
                tmem_frontswap_poolid = -1;
+               old_ops = frontswap_register_ops(&tmem_frontswap_ops);
                if (IS_ERR(old_ops) || old_ops) {
                        if (IS_ERR(old_ops))
                                return PTR_ERR(old_ops);