aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorThibaut VARÈNE <hacks@slashdirt.org>2020-08-18 11:57:31 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-08-18 18:22:33 +0200
commitd8ecaef409517c3c09381bee648e7beb35ae4329 (patch)
treec127909387e103b9f723c1c270ea61abfd7880c3 /target
parent008db6b970613d291b245d95734e3e42b5455f6c (diff)
downloadupstream-d8ecaef409517c3c09381bee648e7beb35ae4329.tar.gz
upstream-d8ecaef409517c3c09381bee648e7beb35ae4329.tar.bz2
upstream-d8ecaef409517c3c09381bee648e7beb35ae4329.zip
generic: platform/mikrotik: fix incorrect test
The test is meant to check the result of the preceding kmalloc() Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit d0498872ff71a79f0676cfc6b6b547c499bff712)
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/files/drivers/platform/mikrotik/rb_hardconfig.c2
1 files changed, 1 insertions, 1 deletions
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 */