From: Thibaut VARÈNE Date: Tue, 18 Aug 2020 09:57:31 +0000 (+0200) Subject: generic: platform/mikrotik: fix incorrect test X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d8ecaef409517c3c09381bee648e7beb35ae4329;p=openwrt%2Fstaging%2Fzorun.git generic: platform/mikrotik: fix incorrect test The test is meant to check the result of the preceding kmalloc() Signed-off-by: Thibaut VARÈNE (cherry picked from commit d0498872ff71a79f0676cfc6b6b547c499bff712) --- 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 06530f7caa..46dc476003 100644 --- a/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c +++ b/target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c @@ -495,7 +495,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 */