[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1444926315-29106-1-git-send-email-wuninsu@gmail.com>
Date: Thu, 15 Oct 2015 12:25:15 -0400
From: Insu Yun <wuninsu@...il.com>
To: dmitry.torokhov@...il.com, david.vrabel@...rix.com,
wei.liu2@...rix.com, julien.grall@...rix.com,
stefano.stabellini@...citrix.com, huaixin.chx@...baba-inc.com,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: taesoo@...ech.edu, yeongjin.jang@...ech.edu, insu@...ech.edu,
Insu Yun <wuninsu@...il.com>
Subject: [PATCH] xen: check return value of xenbus_printf
Internally, xenbus_printf uses memory allocation, so it can be failed in
memory pressure.Therefore, xenbus_printf's return should be checked
and properly handled.
Signed-off-by: Insu Yun <wuninsu@...il.com>
---
drivers/input/misc/xen-kbdfront.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index 23d0549..a3b0940 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -129,8 +129,11 @@ static int xenkbd_probe(struct xenbus_device *dev,
if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-abs-pointer", "%d", &abs) < 0)
abs = 0;
- if (abs)
- xenbus_printf(XBT_NIL, dev->nodename, "request-abs-pointer", "1");
+ if (abs) {
+ ret = xenbus_printf(XBT_NIL, dev->nodename, "request-abs-pointer", "1");
+ if (ret)
+ pr_warning("xenkbd: can't request abs-pointer");
+ }
/* keyboard */
kbd = input_allocate_device();
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists