From 365b212ea99985da5533305ae551410601789455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= Date: Tue, 18 Aug 2020 11:57:31 +0200 Subject: [PATCH] generic: platform/mikrotik: fix incorrect test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test is meant to check the result of the preceding kmalloc() Signed-off-by: Thibaut VARĂˆNE Signed-off-by: maurerr --- .../generic/files/drivers/platform/mikrotik/rb_hardconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c index 4559418de79..8861814be44 100644 --- a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c +++ b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c @@ -480,7 +480,7 @@ static int hc_wlan_data_unpack_lzor(const u8 *inbuf, size_t inlen, /* Temporary buffer same size as the outbuf */ templen = *outlen; tempbuf = kmalloc(templen, GFP_KERNEL); - if (!outbuf) + if (!tempbuf) return -ENOMEM; /* Concatenate into the outbuf */