]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/xen/manage.c
Merge tag 'for-linus-4.13-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-artful-kernel.git] / drivers / xen / manage.c
index 9e35032351a093cbdd19dfea115800c48bbc1d70..c425d03d37d2700de084b920416fef0465d918f8 100644 (file)
@@ -278,8 +278,16 @@ static void sysrq_handler(struct xenbus_watch *watch, const char *path,
        err = xenbus_transaction_start(&xbt);
        if (err)
                return;
-       if (xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key) < 0) {
-               pr_err("Unable to read sysrq code in control/sysrq\n");
+       err = xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key);
+       if (err < 0) {
+               /*
+                * The Xenstore watch fires directly after registering it and
+                * after a suspend/resume cycle. So ENOENT is no error but
+                * might happen in those cases.
+                */
+               if (err != -ENOENT)
+                       pr_err("Error %d reading sysrq code in control/sysrq\n",
+                              err);
                xenbus_transaction_end(xbt, 1);
                return;
        }