From 43949e4d6fdb223c040adbd02e1130b1c33a51ed Mon Sep 17 00:00:00 2001 From: Djalal Harouni Date: Sat, 4 Jan 2014 22:21:51 +0100 Subject: [PATCH] endpoint: don't kfree a PTR_ERR Signed-off-by: Djalal Harouni --- endpoint.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/endpoint.c b/endpoint.c index 7b2a413..75ccf3f 100644 --- a/endpoint.c +++ b/endpoint.c @@ -253,10 +253,8 @@ int kdbus_ep_make_user(void __user *buf, return -EMSGSIZE; m = memdup_user(buf, size); - if (IS_ERR(m)) { - ret = PTR_ERR(m); - goto exit; - } + if (IS_ERR(m)) + return PTR_ERR(m); KDBUS_ITEM_FOREACH(item, m, items) { if (!KDBUS_ITEM_VALID(item, m)) { -- 2.34.1