diff options
-rw-r--r-- | net/rose/rose_route.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index cbc244a128b..b4fdaac233f 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -109,7 +109,9 @@ static int __must_check rose_add_node(struct rose_route_struct *rose_route, | |||
109 | init_timer(&rose_neigh->t0timer); | 109 | init_timer(&rose_neigh->t0timer); |
110 | 110 | ||
111 | if (rose_route->ndigis != 0) { | 111 | if (rose_route->ndigis != 0) { |
112 | if ((rose_neigh->digipeat = kmalloc(sizeof(ax25_digi), GFP_KERNEL)) == NULL) { | 112 | rose_neigh->digipeat = |
113 | kmalloc(sizeof(ax25_digi), GFP_ATOMIC); | ||
114 | if (rose_neigh->digipeat == NULL) { | ||
113 | kfree(rose_neigh); | 115 | kfree(rose_neigh); |
114 | res = -ENOMEM; | 116 | res = -ENOMEM; |
115 | goto out; | 117 | goto out; |