From nobody Tue Dec 2 01:25:31 2025 Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (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 AB31136D4EA for ; Sat, 22 Nov 2025 11:40:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763811652; cv=none; b=tNWxJivcveIv+uexT5/YCrltGpKwLNLBzu5tRLextrto03tXe3knqa8aW+dLbHmPdVJ2JkNobs/IDgvjWBa0F/4xoFkZrh9QTJ604uGIA3Vz3LV/5cLEsIz8+CgiWhMBxrlqkuscytE3+udwZbw6DSoixmHOrmXF+jeynIKhIzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763811652; c=relaxed/simple; bh=VyfAhNYTEQRyLLX4CIhu5SOuwmfErIq92YQFE+IYBh0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nKkI5+dZVAgi4oP9SSsFKCQd9KwlU9tu0QXKoj67oCJ50OOYEguQjvcV5/9bGmcgVEgdmqf/dBi5P5FEYSt69FXeb+HsaYsB1gVIb/qyW9k8mhaLgvws/YIQio1K6MslLLfjKZuXmZiYFuTkr+8E+NsHW5N0oaH9/J5GQg2MnxQ= 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=SZeVeTM/; arc=none smtp.client-ip=95.215.58.179 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="SZeVeTM/" 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> 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