From nobody Sat Sep 13 20:26:29 2025 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 E026C2D0618 for ; Wed, 3 Sep 2025 20:07:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756930029; cv=none; b=T7OPLj3CrSVnFu5JXNkIkhNx/bFBNdKIkBoXyDNxuSMxeDC7rQjIK9FtHrzxQwsLMwba78JgkyTKSPSwvxVaE01fsZ5eNrBcApZPUzkQc5kkMrVlV4IIYt+UNH9UPrUn752ONPmuC3tiU1/PIVu4fGW1bwn+dhl/jID25QpMG/E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756930029; c=relaxed/simple; bh=uWaAPHFGXuNVRpoNOV8NdQqH3odXMlBlmPikZ0OfNwU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SDKNryT9R/15J/Hz3kquubWIburSmqUus6nEPV5xbBLpZ17UTtRFg0gCrr2Y5WdVzZRcrlVYeWJKV9AcpWpdvSVhnPgowk3LY98q9D+RpA3nJM/I93vJN12EeG5gdz8bQltA89JePJWuDFIpBhYULhi38fX02JDgtLHppGrksmg= 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=H9qCCLO2; arc=none smtp.client-ip=91.218.175.182 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="H9qCCLO2" 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=1756930021; 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=faCaSfjQV/nUBWX4PLGb3evLidx3wwNG/UDcGGYNXyw=; b=H9qCCLO2oF6Mfzc2yjZW8bSwG8L7Iw784Ebmkv33rSOwX1oNaihaRGSA1ks963781esx79 KZYGiT1b1LiBQjLcs38nUl4y+ooyX3IFde3GvFJgxNHu7rvXOvru+uQYOy2IdP9QaS2YyM dV0Kh7mRTE5VGp3H3M/f0ZAjSMzsF44= 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] stm class: Remove unnecessary local variable in stm_write() Date: Wed, 3 Sep 2025 22:05:34 +0200 Message-ID: <20250903200534.181278-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.0