Просмотр исходного кода

generic: platform/mikrotik: fix incorrect test

The test is meant to check the result of the preceding kmalloc()

Signed-off-by: Thibaut VARÈNE <[email protected]>
Thibaut VARÈNE 5 лет назад
Родитель
Сommit
d0498872ff

+ 1 - 1
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 */