From nobody Sat Feb 7 21:08:15 2026 Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (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 588AE2E7F1A for ; Mon, 3 Nov 2025 09:18:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762161495; cv=none; b=djmOFNrlRNAnb1/1Aw+WQ8PDZOkv6nsDLVQSvItY1anWY2Qg7wtEea4DWHFjC83AvnQDHnKLvYt/Hr0SM+bcGOAJq2rS1gwhU9TnV2NjUmorw2V8tlmG6k4gY1W7taNlbMxbUFILW2yb40cNZqZAt8NwtwKIXJcxB6titZa46ds= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762161495; c=relaxed/simple; bh=VyfAhNYTEQRyLLX4CIhu5SOuwmfErIq92YQFE+IYBh0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=c4LEXTIb2W2qjpgKxCFqVUFxiKoblHntiGiK86OzjEyEErBY4G6oJt8VPGk2IPTOzbazuVCYt5Fg9cLrC1QXn/RATYABh0nXm8m/umTOzrDwEvHukKKKVzxlvM5+rbBXy9bnCFsl+dURX9FIBLr6eewHWE7Pr97D1ZojHgJaXzI= 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=VCc7uU0o; arc=none smtp.client-ip=95.215.58.172 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="VCc7uU0o" 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=1762161488; 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=VCc7uU0o3gSh/l2zJutUq3ddK4nxUqz1cGKERW42Fox8REh1n4QZ1C3ajAxTUc/t3yj+bK jNH2aLWTZ4pcGF2UCURHl76dmZqEyk1qBoGf2Qd3gooYiU4+ZXOhBrnTNyJHEAQBv6ycM0 tDqDmry7YcsZhYMSC32HMLvzrNDlXOA= 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, 3 Nov 2025 10:17:41 +0100 Message-ID: <20251103091741.2728-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 2.51.1