From nobody Sat Feb 7 21:52:48 2026 Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35E303EBF21 for ; Mon, 26 Jan 2026 00:43:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769388222; cv=none; b=thvW3T1qn8mAZwhoV1gzmwryysrZfFvnXN5ZvH5JD6EM6SP1a0TTDeSXFVwYs0N1WQaymSL/1iRAJx/hmpzi2K08sVhory9/mRWp3mrCJTaz13RxAHExshpIXzrlLr7VmZLYRGSmsolwNMsDa7pnMdPZkMtjRbI7rStvqj0HkFA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769388222; c=relaxed/simple; bh=sHnegaiOKsWSULoWqFRUwF9B4eE4cuuEfZUa8BQMIqs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=k0dqFi0i6jH4BI9ENPWSGN9FeAT05jp547bS9qBkHXxB2w/JtBS1tUSSm6USwL8Bku7afOaSF6fIPRV3zAEjEr7oIlfYUMm6BosNe+AznV0GsQeCjMz+GTxeykcznaT4AP+QkX3sg5s/b3fixhDGgLGoKfr3nxGp8wWz2SaRbhk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=sa7gjUN2; arc=none smtp.client-ip=95.215.58.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="sa7gjUN2" 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=1769388217; 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=Ta4uSEYWxh89CnpY115Qx/QMDioBytXWBwa258BJDRU=; b=sa7gjUN2NsRnxZcVIbH5rfVxOVwdIs60vuAY6zOgCeg517o9iLR6tmr9GkwwTx26EwgEVI l/Krq85CTG46zvyLG/0xDtdi8ilCAFLoxtKVOrOnv1x5U50PhfKqxTSJfy0Fv115XaQwrN W990c+sqPvqDQIgGNCkCFWRtfLuV+wQ= 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: Mon, 26 Jan 2026 01:43:12 +0100 Message-ID: <20260126004312.210402-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" 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_dat= a *source) { - int err; - /* stm->pdrv is serialized against policy_mutex */ if (!stm->pdrv) return -ENODEV; =20 - err =3D 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); } =20 static ssize_t stm_char_write(struct file *file, const char __user *buf, --=20 Thorsten Blum GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4