diff options
-rw-r--r-- | drivers/lguest/lguest_user.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c index 9f9a2953b383..407722a8e0c4 100644 --- a/drivers/lguest/lguest_user.c +++ b/drivers/lguest/lguest_user.c | |||
@@ -52,8 +52,9 @@ static int add_eventfd(struct lguest *lg, unsigned long addr, int fd) | |||
52 | new->map[new->num].addr = addr; | 52 | new->map[new->num].addr = addr; |
53 | new->map[new->num].event = eventfd_ctx_fdget(fd); | 53 | new->map[new->num].event = eventfd_ctx_fdget(fd); |
54 | if (IS_ERR(new->map[new->num].event)) { | 54 | if (IS_ERR(new->map[new->num].event)) { |
55 | int err = PTR_ERR(new->map[new->num].event); | ||
55 | kfree(new); | 56 | kfree(new); |
56 | return PTR_ERR(new->map[new->num].event); | 57 | return err; |
57 | } | 58 | } |
58 | new->num++; | 59 | new->num++; |
59 | 60 | ||
@@ -83,7 +84,7 @@ static int attach_eventfd(struct lguest *lg, const unsigned long __user *input) | |||
83 | err = add_eventfd(lg, addr, fd); | 84 | err = add_eventfd(lg, addr, fd); |
84 | mutex_unlock(&lguest_lock); | 85 | mutex_unlock(&lguest_lock); |
85 | 86 | ||
86 | return 0; | 87 | return err; |
87 | } | 88 | } |
88 | 89 | ||
89 | /*L:050 Sending an interrupt is done by writing LHREQ_IRQ and an interrupt | 90 | /*L:050 Sending an interrupt is done by writing LHREQ_IRQ and an interrupt |