Messages in this thread Patch in this message |  | | From | Wupeng Ma <> | Subject | [PATCH -next 1/1] percpu: cleanup invalid assignment to err in pcpu_alloc | Date | Sun, 4 Dec 2022 11:14:30 +0800 |
| |
From: Ma Wupeng <mawupeng1@huawei.com>
Assignment to err if is_atomic is true will never be used since warn message can only be shown if is_atomic is false after label fail. So drop it.
Signed-off-by: Ma Wupeng <mawupeng1@huawei.com> --- mm/percpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/percpu.c b/mm/percpu.c index acd78da0493b..df86d79325b2 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1817,10 +1817,8 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved, spin_unlock_irqrestore(&pcpu_lock, flags); - if (is_atomic) { - err = "atomic alloc failed, no space left"; + if (is_atomic) goto fail; - } /* No space left. Create a new chunk. */ if (list_empty(&pcpu_chunk_lists[pcpu_free_slot])) { -- 2.25.1
|  |