From nobody Fri Apr 3 08:07:57 2026 Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) (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 A8A103A1D2 for ; Wed, 18 Mar 2026 00:26:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773793575; cv=none; b=ckCuE++/tieQwUWysIIFyPlOm2m2k1Reu9f85h3gjPO26YWywK1RO/MO1C6IMTndZfbyDzBbgLYmFFy2kLX/2lJ0svN+izsSorAlxeHvB97nktmDCE7Vy2GQP4krayExmxzcQgEfwLe3fEsM17OPIT0u96L/YO7kwuEMuZ9Hrwk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773793575; c=relaxed/simple; bh=1wDZ/HMl0g5Jdcn/1cbS5yrAyqqs/m9L5E9FQkQO0W4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RWYTfHLxp+rwKLyaXpTT2bYXG1/4mz/j3gmEYz0qdsiUkJwGpkuJSiCZk4hKZvElDlo6Z1VmTqQF3mt3WrnkpGaVGkw/wZbHnHODeE9BH4Ey1dsj33xCCQaA4gp0wRf/LocWvIcwnndtAL0ncWhmq1RqAvzZ82LgIau4a164EEQ= 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=V6kUOF9i; arc=none smtp.client-ip=95.215.58.176 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="V6kUOF9i" 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=1773793573; 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=LKaGTOrqZcxKvrHo8N4IUQRt0r4j/J4rRNSb5TciUI0=; b=V6kUOF9izPgwxqn688/GhS2jWVlpmci1OwHZsQVdm1WMgIUlyJoWAhY5tKS/qcPMxpGlrt PrjQMlI+dS2XEIkpcuPWx6pAKPNiZH3/C7dfhjnLYo6aRsaTpuCN3wKt7MSsTiwdrZTWZ+ MWnGLyv4UxUm+J9tTHRY55OmgspoZTQ= 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: Wed, 18 Mar 2026 01:25:39 +0100 Message-ID: <20260318002537.3692-3-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1036; i=thorsten.blum@linux.dev; h=from:subject; bh=1wDZ/HMl0g5Jdcn/1cbS5yrAyqqs/m9L5E9FQkQO0W4=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDJk7PzKt3y20ovH4r9txImzyJ3osDVPCTitNV72yhl+kc dffWcWyHaUsDGJcDLJiiiwPZv2Y4VtaU7nJJGInzBxWJpAhDFycAjCRj28ZGc68fpNjUNzYd9lx 6irNuuuBsSWf9p6YHePCE9vJ6nF+ewnDfz8Bqy1Pm4u0VDcEiXRvWn3CIdeKQ6vl8Mc8yxo3o79 RzAA= X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 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 37584e786bb5..4e0ee8e2e2c3 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,