From patchwork Sun Oct 13 08:45:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13834009 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96D68CF2579 for ; Sun, 13 Oct 2024 08:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=W4McreswxizjEIQlMM60xmg1rBlUSBq2zUfhCJ20Y6o=; b=VQNK6yktxSD1dLc/zGjQEo2zTT lQhf2u6Lw2ekg37OWf83/HpcOnKkGfcJjgJ2x8wDwKelzTIUmbulDrB2rUYCEmvxEp+9dSvBeWKet qA1kQM0swy3t1tJ5QnB/jDserbwQnr3m6nF7rT/NZcvT4Zz/iU683b5Gg42ayPogqfYk7Rx+i3Z74 AKiymbIoMpVC5rcxT+QIJARyOd7CpihgRgWpJMRrmQykscX1S2ivERmMpme8Dq2UTfLpSQ57cbHwF kw0bFPABv+bd+bbwGG4FMM1QsXaIWZ1Nv6jy095W2z8z+FRM3KRDBkq+JowBL8uwMs6n2IlHeBbfL 7PpkHfXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szuIe-00000002Qdv-0Pcu; Sun, 13 Oct 2024 08:50:04 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szuER-00000002Q63-1sJv; Sun, 13 Oct 2024 08:45:44 +0000 Received: from umang.jain (unknown [IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 07369A06; Sun, 13 Oct 2024 10:43:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1728809041; bh=7wga7BLx8JWrnFajc2dhp1MguSKadTRPOW8I9HrD7NI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X4wTqUy+gaf3umh1+aZFJWSmJa/NJBlwebPbB9sqXclPhJphjZc/LCgArzyetLJtu 9HygrIJanehRaYpSxPm7yNx1V7rJ+pHJe5SpM4v57V5T5IkkUB9TJzMzF4jTqub2Tp vmYW7pO+a4MHdhcWtE/2afzW+i5UAeAU8A5aQGnk= From: Umang Jain To: Greg Kroah-Hartman , Broadcom internal kernel review list Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Kieran Bingham , Dan Carpenter , Laurent Pinchart , kernel-list@raspberrypi.com, Stefan Wahren , Umang Jain Subject: [PATCH 2/2] staging: vchiq_arm: Use devm_kzalloc for mgmt Date: Sun, 13 Oct 2024 14:15:29 +0530 Message-ID: <20241013084529.377488-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241013084529.377488-1-umang.jain@ideasonboard.com> References: <20241013084529.377488-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241013_014543_653413_39711360 X-CRM114-Status: UNSURE ( 8.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Signed-off-by: Umang Jain --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index e780ed714a14..334fb7037766 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1345,7 +1345,7 @@ static int vchiq_probe(struct platform_device *pdev) return -ENOENT; } - mgmt = kzalloc(sizeof(*mgmt), GFP_KERNEL); + mgmt = devm_kzalloc(&pdev->dev, sizeof(*mgmt), GFP_KERNEL); if (!mgmt) return -ENOMEM; @@ -1403,8 +1403,6 @@ static void vchiq_remove(struct platform_device *pdev) arm_state = vchiq_platform_get_arm_state(&mgmt->state); kthread_stop(arm_state->ka_thread); - - kfree(mgmt); } static struct platform_driver vchiq_driver = {