endpoint: don't kfree a PTR_ERR
authorDjalal Harouni <tixxdz@opendz.org>
Sat, 4 Jan 2014 21:21:51 +0000 (22:21 +0100)
committerKay Sievers <kay@vrfy.org>
Sun, 5 Jan 2014 07:28:19 +0000 (11:28 +0400)
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
endpoint.c

index 7b2a413aa434c9cb6c6c54384d79426b032b7b25..75ccf3fb2ca97c7f2a541a35a77e9572df5830e0 100644 (file)
@@ -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)) {