From patchwork Tue Aug 18 09:57:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1346736 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=RA0R/iAn; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=BKneTW0Z; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BW5wX2P7Mz9sPC for ; Tue, 18 Aug 2020 19:59:08 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=wGR+MSmVcBB3xTCRwybEU0htUsdZswrmz5ylqgj7q8M=; b=RA0R/iAnIVSh1zQ0s56PJlaA+w qRNlw73RsLodcJGSiLhkB+UJr144tCd4lQrZ1wgW5TYymo+OncWWcJVZmsbJSSLF6KRMPqJQuJg6Q 24LaYmYQaSo2DuFFS16sKNL291iUnpmZZEWrKGRGwvEQFiUFEm1j+2DhF5ZDyEHyZwoxCwOFyDa7z gEapk/P8Z0Si/m2iSc40c2s/PYTNTrOAtMSCPaw9aSRJQ4+J0D73/pi/Q08gTtDgBD6QrRJxDnfZB kIJDsW7hVmV1M2GoGvb8iSv/9XdIX03WxZ+AhFx+gUvN+kbISyVn7Eg1vRwvQ7oRLLhAHwI0TTb6X aung+M2g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7yN7-0000Mm-SQ; Tue, 18 Aug 2020 09:57:37 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7yN5-0000MF-1A for openwrt-devel@lists.openwrt.org; Tue, 18 Aug 2020 09:57:35 +0000 Received: from Chuck.tardis.lan (tardis.herebedragons.eu [171.22.3.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id B285B6004C; Tue, 18 Aug 2020 11:57:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org B285B6004C DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1597744653; bh=UZCnh93uKP34GDcKxS5tVrOAG3AFE6fnbz47iz31lhA=; h=From:To:Cc:Subject:Date:From; b=BKneTW0ZxJII4mCNJt7O5YT8jgQHKZlm83qEgHty0HGvU2xgMTEenHb8zepHk3G8T 7Z7NEY2EQH1NiA+63sMJbHo3AHN1sMu+T5aXznOdy2KSsZKpkdfzdnNAorLh9kqeMf aZwvEQ+E9IPA+73kkcMahJe2h9V0IeiIM9cW9EEU= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2] generic: platform/mikrotik: fix incorrect test Date: Tue, 18 Aug 2020 11:57:31 +0200 Message-Id: <20200818095731.9866-1-hacks@slashdirt.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200818_055735_202000_9157A316 X-CRM114-Status: GOOD ( 13.59 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The test is meant to check the result of the preceding kmalloc() Signed-off-by: Thibaut VARĂˆNE --- .../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 4559418de7..8861814be4 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 */