From patchwork Wed Aug 7 20:28:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 817435 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e11:0:b0:367:895a:4699 with SMTP id p17csp568579wrt; Wed, 7 Aug 2024 13:29:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVe0HyPI4+rIxF8L1pfJcRKg/LcVBHSWY/N/bXWaOG93F/aSeA/T8JdJ94Ws765/dEb7IEMpxMa7vQPkU/BSRKa X-Google-Smtp-Source: AGHT+IHCdUvHLoafmkAH+RL5EQPxxcyRTIKOgcVcmvdRTWvmdSmjob+higSroNpa2lUxCoMxxPVy X-Received: by 2002:a05:6102:4409:b0:493:ea2c:6bb with SMTP id ada2fe7eead31-4945be19575mr21749031137.15.1723062581584; Wed, 07 Aug 2024 13:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723062581; cv=none; d=google.com; s=arc-20160816; b=RizyqjfIdQRIkM5+dpNrPJ0SwBz/TAkxaNc4+DhE3mlHLiddTU0bmuzejxzk1PSoEQ MkPitwpBY7WIENZvG9QG52glIOQWRCu4zC2U9lCwKLDeiUTR/HoAdFg8YBv2/O4Fj41P eSAScywksNtyiIt4a6vmAlVdHmMpe9qUy55+iR/2qfuV41QBay0CrRrUJbQ1HkWTz4Rn WjBRRrkiAwXi6ZIfHsxJpecCfAKLg/JEYTVdNEtNtHHTdegnbJOyNYj35uXCcte63Ubw C9YjeffdUghNB1B5C1C1PFYTyWxX34+ydryfXkP83tBdTztbsLgDwOmo0hT/BwQ9G8y4 6O+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iIi2lHvDdEsZKrUItMJRcgJ0QP34OToUQAWwLAh7heE=; fh=6G+iYi/ST5uLBPXNX5mPf6b96Juu7dKn/IuqzV14oqE=; b=hro+s+M2T7NYIpMHweZ4KnOoXNC+kf7qrm6Vrg7ujY8QObFSizsTj5VeITTw0ZACUA 8lYQJxzgyE8whzJjmhbQuUj4kodAq6XOg2RYSZFCC3tYDE2sMKQQXqBke75Wv32ZI0A1 6VToqEZATQCtqdZa/i4UivJ5N/dmi0bcuojPNN5+UziIsCFahK2VI+2y2HfSliEstsPV lzm2CdHfNts4hqH3J0qWBCtH5T67YbrGaPUbHixxYkFOj/VSn6v+aIGwnMVrgIP/4tkk ySocqtg2Fz/nFSPiY5c5fRHed/uxXlZAd5yeb8QuKMkX/MOO36HCfojtvFc4r2VqjcQp pHcg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fMM8OGjp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bbbb92f4a0si26541696d6.582.2024.08.07.13.29.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Aug 2024 13:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fMM8OGjp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbnGh-0001Ii-C9; Wed, 07 Aug 2024 16:28:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbnGe-0001GJ-K9 for qemu-devel@nongnu.org; Wed, 07 Aug 2024 16:28:21 -0400 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbnGc-0006sw-AA for qemu-devel@nongnu.org; Wed, 07 Aug 2024 16:28:20 -0400 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2f1798eaee6so2246591fa.0 for ; Wed, 07 Aug 2024 13:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723062495; x=1723667295; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iIi2lHvDdEsZKrUItMJRcgJ0QP34OToUQAWwLAh7heE=; b=fMM8OGjpsm4XcmXoZCocQnq7ACgb3PZBlzFpDB6RhHe0MElC5qtTCa53i7rEuBoR3l obN8lontnvqoIYMo6SCqorCF/gQNjcIXjX096bzVci1QYKEV3BUvWBfdNtWMD5fpyZiw LANqMV4SsutJK6v4vzfBZFpDS7z1LhpDNW+qsAJ0uc4saFrbPQWWeSFe9WAg4ZpCrRma EE6MBdqHMH/8zCRQIV66bQ2a1a+wXZP5rFYI/hsLaki+CxfYtyHA/1ipkt/kQxTHSCxN 12huhFwVU2INnaxMj00qlIi7ZWzqSbgsH3AF5zxUODYV1gB07FfdjDwOJbFxYzbu+eiZ is5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723062495; x=1723667295; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iIi2lHvDdEsZKrUItMJRcgJ0QP34OToUQAWwLAh7heE=; b=cEilcZBKT1ABgtOwzu4gaagapUz1wluWmPsqNjDxtcrbjLaFRBklbDpVDovE05uA3O KPHh0EPl/aX7GX3sGqoYqq6yBuK8Vb6avhMfj2qlP+z1+2UAQPzK2qXZ9qwmk47mVidc AsqYhQ0qRVP3nwI5FLIIkxol1ajaluIXrVKmLA0EP5cjBGVaXgI+0a4dOnptxQtv3FqU jragTeIJ4X+QS0hKTi4EXVFGae9CLA2VV3L5cm7q4MsSqJIZGsBhfzMXA1O5z9OdsaBY 1fmG9d4pIHwPzxdUWJzZYlKwpgnmBCrFMWbDvqRIcJdKgDVleGmkiROwE2O3w58cq78p nYBw== X-Gm-Message-State: AOJu0YyQxgMUkZ32cg5GBlIrl7A/SZjPpoCOT6Peoo2Lw34QSFu3zq1U 1YDx7oWkELRMcsSWlH8VtpYJQwE76ivOxRy0JUlXq0e5hTEAxMx2FexKz9uyuEDoIB9Sj/H4De4 I X-Received: by 2002:a2e:a0c9:0:b0:2ee:8720:b4c3 with SMTP id 38308e7fff4ca-2f15ab1c1a2mr125847111fa.43.1723062494955; Wed, 07 Aug 2024 13:28:14 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.120]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290580cf79sm43019145e9.48.2024.08.07.13.28.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Aug 2024 13:28:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Glenn Miles , Caleb Schlossin , qemu-ppc@nongnu.org, =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= , Alistair Francis , =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH-for-9.1 v2 1/4] MAINTAINERS: Cover PowerPC SPI model in PowerNV section Date: Wed, 7 Aug 2024 22:28:01 +0200 Message-ID: <20240807202804.56038-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807202804.56038-1-philmd@linaro.org> References: <20240807202804.56038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=philmd@linaro.org; helo=mail-lj1-x234.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org It is unfair to let the PowerNV SPI model to the SSI maintainers. Also include the PowerNV ones. Fixes: 29318db133 ("hw/ssi: Add SPI model") Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 74a85360fd..52843876ab 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1542,8 +1542,10 @@ F: hw/ppc/pnv* F: hw/intc/pnv* F: hw/intc/xics_pnv.c F: hw/pci-host/pnv* +F: hw/ssi/pnv_spi.c F: include/hw/ppc/pnv* F: include/hw/pci-host/pnv* +F: hw/ssi/pnv_spi* F: pc-bios/skiboot.lid F: tests/qtest/pnv* From patchwork Wed Aug 7 20:28:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 817433 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e11:0:b0:367:895a:4699 with SMTP id p17csp568500wrt; Wed, 7 Aug 2024 13:29:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXHhZAvMB8u4hVWcIv35f7O4PNQP0iOuBMNKxitwr1achzI31CYuGGKCKgZmMZoaVMF4bQ3Frg4kfi0WmldIAxU X-Google-Smtp-Source: AGHT+IGw31AJ6ymhKzfVkBH8NbpY4tZ675smUaLmfmYw4lyyomwmFf7PGy4dWNPSXo4ESVcAZ4Xa X-Received: by 2002:a05:6902:18cc:b0:e0b:a8e4:ac75 with SMTP id 3f1490d57ef6-e0bde3c94afmr24758393276.24.1723062566901; Wed, 07 Aug 2024 13:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723062566; cv=none; d=google.com; s=arc-20160816; b=uamNe4EmFYwDHvZ0ZgdEJFEWkIXTdb8NDPctO8HFOnPCnTwo4RIds5X1zaIhfnda4/ Xa0E7AaiBPSFyrvdQNa3SB5uuN6u6rQ8+D+WiCrKvDnz7u11CXRurBN+CjwAUxy6M8KF Yv2f54+8JoanISMXLTC2f1GP1ETCBP4c9me5vd9aIYNqdY0IhrUrogohw8r6p8iG3WUM 6zxfVgY/WmO8gY10oNXlVU0vv8izmhbtylvsnU8P9T1NuDu85LMoFbKJSCglYwS8BClB V33ojU1drXWLgkh06BrOd2mYE+LAZmWZsmTzhFZ72nqdPl16/MeriRcE9Fw5Eo/hNbV/ SEww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8TvYvkgtExP5sUQjhWB+PYXRtHHu4raSI4RPFwJP3Ws=; fh=6G+iYi/ST5uLBPXNX5mPf6b96Juu7dKn/IuqzV14oqE=; b=RFU2HleVWFWR/RRrBm3g4mBiWVh4MgLcjlV81UCqZc9+RNK0Ms4deu7GBlB4OCNq9B KdN0K2y5RpjXz4Oox39xGHEEOuoO+DMXEfJ0GDc5T1FNU+OiwMXVY0PhKE7/EZzpvUVz CQDckJ3JyaLAgPL1/CfafJ2h9dXV06begKqhVBa+xJ66x8MipUr4HqBeBHd5nuba3qg5 /V9FfsoHla63jwim9zYipodSgdOapoUb7ZrutwlwSpNNzvp1yZKC+P/A7ThzL5YAXaAr uDx75GpurXtYtlmRdd7Io6a7BVtsb1KS2X8kafYuiDaoPfRMWYqxBiG8qUaBMtzvn6mZ 4jtQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cQOFieRs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a37884b9c8si243629185a.664.2024.08.07.13.29.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Aug 2024 13:29:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cQOFieRs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbnGq-0001Wy-5y; Wed, 07 Aug 2024 16:28:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbnGi-0001Oo-Rs for qemu-devel@nongnu.org; Wed, 07 Aug 2024 16:28:24 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbnGh-0006tO-7n for qemu-devel@nongnu.org; Wed, 07 Aug 2024 16:28:24 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3686b554cfcso123729f8f.1 for ; Wed, 07 Aug 2024 13:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723062501; x=1723667301; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8TvYvkgtExP5sUQjhWB+PYXRtHHu4raSI4RPFwJP3Ws=; b=cQOFieRsWo3zFPryncg6Yzt2bYMHK3Fc2VarD4w8lkw/vBDA9E30FGvhsDpNk0z3lZ WEZd3jEqo+ZihC2+yWZolEY8vriE8AKzmqtyWR160PP/l0mVp2lvCnQ2DhT9RUGRLgrE 4pdCQwWgHCAWp1YB33DoD8wae8q8qhG2zwYsyOJ9JkEZccm807u3wLRbzJFt8dWN6Igj dAdlxSCq3pPykHVw/q/Ib/C9M+TYS5uQqH7YsiQItL19gpiENCp4sT122+3TkMG/rGco VXhmVgpY3NQwDJxnVUFrwSnsDZ6SCcZ6iTQVu8TgOrHIOZNv06lEd/aePJ14B3oJNZtw r24g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723062501; x=1723667301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8TvYvkgtExP5sUQjhWB+PYXRtHHu4raSI4RPFwJP3Ws=; b=aAdJ7qdlfB39k5Y2eOR1L1YBuTVO/BamF2P+I2hFID7yVpIvcD+JclMuvHe/iNo7cv 3B0l61fr3pVotsv9LagsixcjF/Ktnhj5Gd2NpjBqzt3pRDfsA6zN4qv3Tox+2SZtBLNO Qj+I+3hVleJSTUfuME0RpJ/5tS3cgfWrb3cJeJ///SBiuy2P32mDgG12Oyc05A4pcEj9 x9qPIJyTcjPPQIX6TskRyzyaWXc33kBz41SaduxY5Uk2PK8Spl58ldUlbIBEjPpuVsdp jFszJoeMt9bqzRbRkCrnJB004Tom70O5V2pKme5Ums7OmoTenSF9ScNgPentZcdWMcWO Lotg== X-Gm-Message-State: AOJu0YwCEchnN3dGOBNbEAWmUMPLg9+WRyh/Tvx5jvuSZ8+CWnIia1lr qrg70PBPKkTlICfrV58k2fIMLKdSDX2SGAbkGoDb1ilzKI1ijk/KIo0Pb3NVt0IuGNXJFnz22N6 W X-Received: by 2002:a5d:5e11:0:b0:36b:cc42:29f9 with SMTP id ffacd0b85a97d-36bcc422dbcmr9853284f8f.51.1723062501267; Wed, 07 Aug 2024 13:28:21 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.120]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36bbcf0cc8esm16889501f8f.19.2024.08.07.13.28.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Aug 2024 13:28:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Glenn Miles , Caleb Schlossin , qemu-ppc@nongnu.org, =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= , Alistair Francis , =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH-for-9.1 v2 2/4] hw/ssi/pnv_spi: Match _xfer_buffer_free() with _xfer_buffer_new() Date: Wed, 7 Aug 2024 22:28:02 +0200 Message-ID: <20240807202804.56038-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807202804.56038-1-philmd@linaro.org> References: <20240807202804.56038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org pnv_spi_xfer_buffer_new() allocates %payload using g_malloc0(), and pnv_spi_xfer_buffer_write_ptr() allocates %payload->data using g_realloc(). Use the API equivalent g_free() to release the buffers. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/ssi/pnv_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c index c1297ab733..13a47f07e7 100644 --- a/hw/ssi/pnv_spi.c +++ b/hw/ssi/pnv_spi.c @@ -53,8 +53,8 @@ static PnvXferBuffer *pnv_spi_xfer_buffer_new(void) static void pnv_spi_xfer_buffer_free(PnvXferBuffer *payload) { - free(payload->data); - free(payload); + g_free(payload->data); + g_free(payload); } static uint8_t *pnv_spi_xfer_buffer_write_ptr(PnvXferBuffer *payload, From patchwork Wed Aug 7 20:28:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 817436 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e11:0:b0:367:895a:4699 with SMTP id p17csp568580wrt; Wed, 7 Aug 2024 13:29:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjB1xNbh/FVrHBbTphM6lU6lzHKx2Jx9bH1F4tHxJ0G//6XnPlZ30Q5F6tsHnOfLCetT/XebGnbaERX7LSuR+9 X-Google-Smtp-Source: AGHT+IEmElRTh0TRCjAlTpIxeZpa6gts0cBVhE4Ldtndnc37dh8hG2HBTuH0in0iwhiRFbtmJ3Rs X-Received: by 2002:ac8:5d50:0:b0:44f:fe4f:41d8 with SMTP id d75a77b69052e-4518929e5f6mr246921651cf.42.1723062581595; Wed, 07 Aug 2024 13:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723062581; cv=none; d=google.com; s=arc-20160816; b=KgczYciTt+iV6Gd4pPrNFtI0tbjfQlSyJ7DFNhyOA4K3eGMbvditGZBfkBZJe8DcSx YW/BdcZcbUPwNFAk4DzuwA0qYaD+GAXu21Igen2GbDdg0Vuivh34DhrN2Zw2m0itD/ib oOxFOeGTWENxqyWozvdOQGPDadyzZcDkVW+vKT+pUad5wHEuircVM8dc97ksjtDngtKe Fen6nGYXbo1muccOm1+SV1tVKRQVlG2pBiRqKQoj+qVUCbOQzIswt09ZyiEiIAGTdgCS dJMIvDx8DYd4jO7JvtuJtkENsOSivUV2voig7RX6C88jAds/pLTBDLu3B4Xk6IIfHBAy I/Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=64V2wCrrYmQb5TKOeGR5XbQEWlSQEIaOZkBcAH6L56E=; fh=6G+iYi/ST5uLBPXNX5mPf6b96Juu7dKn/IuqzV14oqE=; b=JrwxoW85YJg+wYncRQvpJRM6DOtRyHwFr1subawjjbYLv5EDn4nx48W0cYy6BF0BSk U5g/2F5+V5lqYOXXZoBW6lurVNOctbNjfH277rCM9ETlWdM0e4n3TEeXHz/ujWVZF/MM wryCXwA4P6Ven9Tmw2/OI6DkapSj8+3v+P7CP5wNugkRaMlxbJBVnC5NfS4/aiITU+l2 lQ/rh/v2fw3shGUx8VXw/XCHN5ViwFcF/hLoZzEkg1RTYkzzXiS22zgC1NjweQzsGgcj YC10FZwJMlSXcL7F3uWaMrPjHfuueC/K7kq+FrikfZ2XsqAPA85S7ydPabLemJPZxcnD y6OA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qYOa2xoC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-451c87026ccsi24431711cf.109.2024.08.07.13.29.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Aug 2024 13:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qYOa2xoC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbnGr-0001dl-JN; Wed, 07 Aug 2024 16:28:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbnGp-0001YD-W2 for qemu-devel@nongnu.org; Wed, 07 Aug 2024 16:28:32 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbnGo-0006tz-2L for qemu-devel@nongnu.org; Wed, 07 Aug 2024 16:28:31 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-368663d7f80so98112f8f.3 for ; Wed, 07 Aug 2024 13:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723062508; x=1723667308; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=64V2wCrrYmQb5TKOeGR5XbQEWlSQEIaOZkBcAH6L56E=; b=qYOa2xoCjjcofywzBJvPEsG4kUCgPi6vTeyxn4vDQmXCn6Q1wlfCuLZEjuEM31VdT1 A+4xkja2avrRw7mxVCgY+N/WcjpYi8NWLE8zQNwlEpPmlYtcogQoGMLL2e9umSLN7KrM g7Hj0NXTY5FTVV58932/xfjXqXJRLir8Yb6Bm3S33u9xdlgEymjY2AeQQksrSE7NZu8d XSxgHKE4jYbgkTlc5z218aw1Plk1UnUCazvBgX3G1Eh4y2WL80OVaCzHHphJF1o5Z/3D qYCMiHFHoVqoKeuuAOXIGMbSfrZAy91P4pVDlsVBPpMOzDIF8+AMDCpybfoBa8B7R4q4 GQOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723062508; x=1723667308; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=64V2wCrrYmQb5TKOeGR5XbQEWlSQEIaOZkBcAH6L56E=; b=riLhreh0bdCKUHk3Mw4gRtSVZXDk0NwOZZWGlXFF58zIWl83kUKrXP/liHQ2dKq+c3 n2DMoAB1DSDMU+vIWoLa5yozwmW508mCAd2uxkxr2MLM9VFEa4VPgRNZVJh4UXqqnw/T in8t9fDPPXtUgDS6kadRg65oW95awb5xVyXgeBqjjpp0tWTgl8M5rdKLeP2PvEdDgwsh dXQtNN2rdHCZgzKauBX9ChFp3hUzFWKNglyvf/Bro9XKnyFvqAu3J5TCHwb0BZrPw21o vdLy6AdFIQT0NswXPjSLN06QKjaljrRpGXnI6P1CB0x67+Zz61k1BGdMkS4czXFc2t5M T3KQ== X-Gm-Message-State: AOJu0YwXAzZQ2dxaUkurGmm7jWHNmwQ674s1Wm9NrRt7OsOBxMTurOYY 9eK2XD9l/7X6f85vZ9S3Rh/MqsBKFIEx/5ybYyArLSzC+WQlPrNXaA1ZeKkdsA9xRxmE7x9PXNL U X-Received: by 2002:a05:6000:d2:b0:368:71fa:7532 with SMTP id ffacd0b85a97d-36bbc0e7225mr11786735f8f.31.1723062507881; Wed, 07 Aug 2024 13:28:27 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.120]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36bbcf1e0bcsm16946687f8f.30.2024.08.07.13.28.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Aug 2024 13:28:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Glenn Miles , Caleb Schlossin , qemu-ppc@nongnu.org, =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= , Alistair Francis , =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH-for-9.1 v2 3/4] hw/ssi/pnv_spi: Return early in transfer() Date: Wed, 7 Aug 2024 22:28:03 +0200 Message-ID: <20240807202804.56038-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807202804.56038-1-philmd@linaro.org> References: <20240807202804.56038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Return early to simplify next commit. No logical change intended. Signed-off-by: Philippe Mathieu-Daudé --- hw/ssi/pnv_spi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c index 13a47f07e7..05e6afc11e 100644 --- a/hw/ssi/pnv_spi.c +++ b/hw/ssi/pnv_spi.c @@ -217,6 +217,9 @@ static void transfer(PnvSpi *s, PnvXferBuffer *payload) PnvXferBuffer *rsp_payload = NULL; rsp_payload = pnv_spi_xfer_buffer_new(); + if (!rsp_payload) { + return; + } for (int offset = 0; offset < payload->len; offset += s->transfer_len) { tx = 0; for (int i = 0; i < s->transfer_len; i++) { @@ -235,9 +238,7 @@ static void transfer(PnvSpi *s, PnvXferBuffer *payload) (rx >> (8 * (s->transfer_len - 1) - i * 8)) & 0xFF; } } - if (rsp_payload != NULL) { - spi_response(s, s->N1_bits, rsp_payload); - } + spi_response(s, s->N1_bits, rsp_payload); } static inline uint8_t get_seq_index(PnvSpi *s) From patchwork Wed Aug 7 20:28:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 817434 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e11:0:b0:367:895a:4699 with SMTP id p17csp568504wrt; Wed, 7 Aug 2024 13:29:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUAX9cT6C6HETD/M6+SHZLO2qPkYeyM2W9zR7KIGxDd3GzeCFMjWiogM8IumcvOij5qPA5jm6BiUgMs9omqdU+Y X-Google-Smtp-Source: AGHT+IFdv2CEES+266JWDDppKI7mvKK1p2boxNH24nGDO9UYYmqpPkJzNT+pvbZDetEseSVDSavj X-Received: by 2002:a05:620a:f01:b0:79d:5c31:718c with SMTP id af79cd13be357-7a34ef032f5mr2391240785a.27.1723062567444; Wed, 07 Aug 2024 13:29:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723062567; cv=none; d=google.com; s=arc-20160816; b=vO4BuZoD2adPzRTGIZrHi941rjaUJjStw1h7o44SCyZ3aZVDlNGHq3mmChZ09jJVWy Blfo1WPzE/RZVcsyFRqWPRKpSnnWT+GRedSwtTfttLn075dUzrfETG6w1nnaiCpH6pIa NpGhKZ5wanQ9N0V4pUx2DBFMPWsxASOu3svRGbEW+OGXvKWriizWppAFbXdeuwTmSnmI wsIKohVz5p5Lw/w1MgTwNtU8AbKDBLeiPKxxmVuM4m4ePO1YmnLRZKaOkpTMmgqTFzys RCuAGB5CsBTBR8VD8PBUJm3NNZMnVcgi0AjbMb0eEigyXbjuf9XEgPjxEoLaQdMn7Wmu fkkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=i6ryEDlXxlrvMeiKVLcQCfvmoYPTROsSgs3XZya+DuI=; fh=Xd5K6BNi0XEHDFf6w54PvhxwTh/7xCtwnQ3cskUYwiI=; b=IqLk0Uh97bw75weQx7JtKQ588z3eeSCiVDoRXPOCUPm6IueKwCNlh+gfLfAUjOQjC4 bD+uVJj6JDpqgzJvq0OGB2KhXN71R4M0oKcRigJsU6DgZMSrZTQEgqYarRAjs9aP3q5R cI8sY09jJpsw5+4GrT3wgxGTjR1nJgnSoRA0Pe+xJ3v3F1UfpfMqL82d+cn1/rT0XwpY rvIj5cU6CqYhvc16WQnlYze2bC99ot7hr/nn7qmYh/0n7RLLogXcnImAIChKaYsbr8Cn Gw0Sa9MH8p+AHS/au5w14bwmZtU/5uXjPPa3N4OVDT7++uK8/6NPMARN0tLQ8thylu5+ aYdQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yWBB0tQS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a37882a3b2si238075985a.499.2024.08.07.13.29.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Aug 2024 13:29:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yWBB0tQS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbnH0-000202-0J; Wed, 07 Aug 2024 16:28:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbnGw-0001y9-Ui for qemu-devel@nongnu.org; Wed, 07 Aug 2024 16:28:39 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbnGu-0006uO-8D for qemu-devel@nongnu.org; Wed, 07 Aug 2024 16:28:38 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4280ee5f1e3so1966045e9.0 for ; Wed, 07 Aug 2024 13:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723062514; x=1723667314; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i6ryEDlXxlrvMeiKVLcQCfvmoYPTROsSgs3XZya+DuI=; b=yWBB0tQS3x/zbLLG5yYzvkI66qaduOSxYEAG7FSlLKSlV09G4cX3dc2PiSvo281pyZ lcJSLxTd8VMQyrmp2p8G23X1K7NcG9UAkpxUyeWfHEtw9Fm18ozYFsBOUFJakW+MFXCv wVzRVb0/eAWd2BKZ0WN6Y3ci5o6splvjw/ke4K7d1AvAecf37d5Alb6QrpoTInBVxLCW JDagWNd74Z/meDBtFlzR6q21Mk5EjAxZqic7ILSnZix9AiQErRmu6xUhn0MrNXaYBC0B e+uRqO1S2/YE1nvZygHHxTHR7JJTIBamvT+qbhgSgfhs3jhMjBy+ZihcEfKzS05Nxu2h PKAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723062514; x=1723667314; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i6ryEDlXxlrvMeiKVLcQCfvmoYPTROsSgs3XZya+DuI=; b=SxVlMoiTOdSRMA+NbEBjf4QOUOlhsCPIZeYBBkrrL407EfCeY/DDMuGWUS/lmD3ngx rxMv4RarkbWSi2tcUrxlmNicE5HUq7k1O1xyiDke9hpXemb2BUfNhqT9wcNffog02Crj UQKOcLkT+1QA3Csy6BCblZ9E9HQVhFlzz5Npwpa0Q/T9PFcyuKALNGFoxVQUIKZowbMC /RdDe4GmE7PCRTAjMuO/VxurMaxfpjLKfbzhGtS4D5V7ooy2ma3bASQwrxemKebO13Xg BkP7UZV3BbArKDBUcwiIZJ9WDAzHl+VZjlxvmdvzA0N9DfAS6yQTDoOj/EgQQcT6cphi m+2g== X-Gm-Message-State: AOJu0Yy8HpwdtP7HsMdtQu1MogANMy5CU7gctK6nLF5Dgf+vU6AqGAFD fQ6EqIOGYbOIk2ALnzkrStOd9YDxxGdhV9sDSgtrL7l5kUHLTH606heuQNE3wSiQxD1FX9a7o82 V X-Received: by 2002:a05:600c:470a:b0:425:7884:6b29 with SMTP id 5b1f17b1804b1-428e6b08a32mr142794275e9.19.1723062514246; Wed, 07 Aug 2024 13:28:34 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.120]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290580c573sm44258595e9.39.2024.08.07.13.28.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Aug 2024 13:28:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Glenn Miles , Caleb Schlossin , qemu-ppc@nongnu.org, =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= , Alistair Francis , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Chalapathi V , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-9.1 v2 4/4] hw/ssi/pnv_spi: Fixes Coverity CID 1558831 Date: Wed, 7 Aug 2024 22:28:04 +0200 Message-ID: <20240807202804.56038-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240807202804.56038-1-philmd@linaro.org> References: <20240807202804.56038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Chalapathi V In this commit the following coverity scan defect has been fixed CID 1558831: Resource leaks (RESOURCE_LEAK) Variable "rsp_payload" going out of scope leaks the storage it points to. Fixes: Coverity CID 1558831 Signed-off-by: Chalapathi V Fixes: b4cb930e40 ("hw/ssi: Extend SPI model") [PMD: Rebased on previous commit (returning earlier)] Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/ssi/pnv_spi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c index 05e6afc11e..eadc36fa86 100644 --- a/hw/ssi/pnv_spi.c +++ b/hw/ssi/pnv_spi.c @@ -239,6 +239,7 @@ static void transfer(PnvSpi *s, PnvXferBuffer *payload) } } spi_response(s, s->N1_bits, rsp_payload); + pnv_spi_xfer_buffer_free(rsp_payload); } static inline uint8_t get_seq_index(PnvSpi *s)