From mboxrd@z Thu Jan 1 00:00:00 1970 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 A0AD4CFC52A for ; Sat, 22 Nov 2025 11:40:58 +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: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:In-Reply-To:References:List-Owner; bh=yuMMfRji0QsBlO0qJt9H926jh5AK/yBWl814HSXET8M=; b=JMU5ldBO+A8CDq/aWA0Fx01vF9 JKYyS6oensXHjOFzazhQmoakwcCpWU44rb30XigcKc0XEaSoG18H1MDpkJp0MH91lQ8UZDPoq00wP efNyG8RCfm1g1cPFgdaeXsMzro3zJYp7Ht9v7UVK3iunhuUYAH8uFaQWNaNnV4+75aKdCf4SPvbcK 6ZPRrSne+7ezJ7GwbBg26kWWpUX9IvB2zrmYgzC2Dvdg4Uw/JJT0KRWGMMixWEZ4ssxthgMkp/Mut i03qWVKVdXp6tXUsKx/DuAGHW7k+0R7JFESy3romDxUGlnqS7Aq2NLq+uqiyS2ucV2TCD/VTYHL5u pU51pSpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vMlz4-00000009VsB-2EPN; Sat, 22 Nov 2025 11:40:54 +0000 Received: from out-189.mta1.migadu.com ([95.215.58.189]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vMlz1-00000009Vrl-2Ghs for linux-arm-kernel@lists.infradead.org; Sat, 22 Nov 2025 11:40:52 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1763811646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=yuMMfRji0QsBlO0qJt9H926jh5AK/yBWl814HSXET8M=; b=SZeVeTM/OdvxH7SLi3A4YesDiPCrgCawtJyyHZd+uHQGXJ0MdX7rEbgjuRgOSn7DuN8pwD aKOxahNrshLUcYfza9Y1O+sU7Cr2aVChKxiuM6YxPyxddCt4FJ2/3PQa/5LV0eb6A93G9R gfPdfR9lT2jKZBqzG1j6f43qVecXYfY= From: Thorsten Blum To: Alexander Shishkin , Maxime Coquelin , Alexandre Torgue Cc: Thorsten Blum , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND] stm class: Remove unnecessary local variable in stm_write() Date: Sat, 22 Nov 2025 12:40:18 +0100 Message-ID: <20251122114017.446643-2-thorsten.blum@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251122_034051_814910_55F1C9C0 X-CRM114-Status: UNSURE ( 8.14 ) 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 The local variable 'err' and the corresponding if check in stm_write() are unnecessary. Remove them. Signed-off-by: Thorsten Blum --- drivers/hwtracing/stm/core.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index cdba4e875b28..f3814e4ecf23 100644 --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c @@ -602,17 +602,11 @@ static ssize_t notrace stm_write(struct stm_device *stm, struct stm_output *output, unsigned int chan, const char *buf, size_t count, struct stm_source_data *source) { - int err; - /* stm->pdrv is serialized against policy_mutex */ if (!stm->pdrv) return -ENODEV; - err = stm->pdrv->write(stm->data, output, chan, buf, count, source); - if (err < 0) - return err; - - return err; + return stm->pdrv->write(stm->data, output, chan, buf, count, source); } static ssize_t stm_char_write(struct file *file, const char __user *buf, -- 2.51.1