From nobody Tue Feb 10 06:25:15 2026 Received: from mail-43102.protonmail.ch (mail-43102.protonmail.ch [185.70.43.102]) (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 CB0F939C621 for ; Fri, 16 Jan 2026 17:48:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.102 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768585739; cv=none; b=qTQ0NUvfgQA542m7FstOC/VaG4xvHNefofYeW+w4ojVlOUsLk7D/rgkO1aZZqkOBjztORsaewSkg/3WEBwIeIYT6b9Int8nCUOZ4MMuU9CDQjh10T2Le5KjXzXlsGB1dmHMhXjqXrruPe3uyOdIMfETvg2cWjAQpKuXNEdKfUL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768585739; c=relaxed/simple; bh=3LoqFg/PmAI9CqpFTc+BFSigHnAoeF5eIe09flOPb5U=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BznR1zDYOeKAK8ctn/0eeM1rPmbvkoeH/xaFju4F+JsO1kgBGN+kt9kA7SDkyv4k8ZE+x8Z/TF6V97cGp+ObiZ/TMMsKy29H0inikQh5szSQkyk1jwIiWAIbdBf6V3Nqkn9KnGOf/vtf0EQP2Mj4+RBjbGfymn0iHPURuZNc+ZU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com; spf=pass smtp.mailfrom=protonmail.com; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b=AgJoeX55; arc=none smtp.client-ip=185.70.43.102 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="AgJoeX55" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1768585735; x=1768844935; bh=3LoqFg/PmAI9CqpFTc+BFSigHnAoeF5eIe09flOPb5U=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=AgJoeX55SomJ/1DbyeTWOvn7uE8jc2WrWHONP2FtE4HWGmeihb3E0oc9y+Ta3Bxxe sbx2c2eRsBJFLTIo9aual2Ik5Armq721128q588pE3nFhZzNaCuhm++keS6dl1RSgW GxcUbdMg0+o4X8qGWOpz8rWlazNAESOABDdyPSgIGmCmpLXBNud4fM/TAec6ZaebHx 4VZoalW5XnoQGWz9FHx0o/t1UZUMMazvV/KrZJkKhXhHzFsH7EOmHdQ+W3UyU8H7U9 NoK/YaS17RbBqcaA6HUsYYyqIOlM4TDiLTWAfds9OM+FdRWGa26Urp9FH5seGEqohK tqJgD2VHunhVg== Date: Fri, 16 Jan 2026 17:48:51 +0000 To: Dave Penkler , Greg Kroah-Hartman , Michael Rubin , Dan Carpenter From: =?utf-8?Q?Dominik_Karol_Pi=C4=85tkowski?= Cc: linux-kernel@vger.kernel.org, =?utf-8?Q?Dominik_Karol_Pi=C4=85tkowski?= Subject: [PATCH v3 19/27] gpib: ines: Unify *allocate_private usage Message-ID: <20260116174647.317256-20-dominik.karol.piatkowski@protonmail.com> In-Reply-To: <20260116174647.317256-1-dominik.karol.piatkowski@protonmail.com> References: <20260116174647.317256-1-dominik.karol.piatkowski@protonmail.com> Feedback-ID: 117888567:user:proton X-Pm-Message-ID: 83fddb74b10bc69255ad4f89c89e913a7c9e82d3 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 Content-Type: text/plain; charset="utf-8" Use the return value of ines_allocate_private in calling code as early return value in case of error. Signed-off-by: Dominik Karol Pi=C4=85tkowski --- v3: - Split commit into smaller pieces - Improve changelog - Change `(retval < 0)` to `(retval)` drivers/gpib/ines/ines_gpib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpib/ines/ines_gpib.c b/drivers/gpib/ines/ines_gpib.c index a795b12ef8e0..737de5fef4b3 100644 --- a/drivers/gpib/ines/ines_gpib.c +++ b/drivers/gpib/ines/ines_gpib.c @@ -675,11 +675,13 @@ static int ines_generic_attach(struct gpib_board *boa= rd) { struct ines_priv *ines_priv; struct nec7210_priv *nec_priv; + int retval; =20 board->status =3D 0; =20 - if (ines_allocate_private(board)) - return -ENOMEM; + retval =3D ines_allocate_private(board); + if (retval) + return retval; ines_priv =3D board->private_data; nec_priv =3D &ines_priv->nec7210_priv; nec_priv->read_byte =3D nec7210_ioport_read_byte; --=20 2.43.0