From nobody Tue Feb 10 05:09:41 2026 Received: from mail-106119.protonmail.ch (mail-106119.protonmail.ch [79.135.106.119]) (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 44ABD340DB0 for ; Fri, 16 Jan 2026 17:48:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.119 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768585712; cv=none; b=nl6haPCwuZVyUREls9WqgZRJa34wJQNHgVxAflfr3rKHHPZrW8DUFdFoukJ7dh4tK0mXeCxMDQBTCHGaY2PzIvF8tEYgx0jOl4vTHtDnhN6aWLl1QwqWQirzGSXD73AT7PuJGsCg26sFp4rDhlltskvpXT/MDX+X0QPnfiBgzP8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768585712; c=relaxed/simple; bh=T05Jd4m+qYybfNoS1tL7mIpz5lKAL4uLs1i1/DTifeE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Llx72ewsd3IAa3dxzh9kblMsmbGoU6dyjbo5eQBUBYo7wh5skX+lCEP0arTE/aJ8zpl0E9RUtcRFzj5dMeb6n2+JMXY6pljz9k3XgjrlNzXZXiQQV4kpX8d9BajSv3Uj4A2pC9Nz3UlxXyRq83y+K64VXpDKSG0fJui4Ge400W0= 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=PxEMfZBD; arc=none smtp.client-ip=79.135.106.119 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="PxEMfZBD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1768585708; x=1768844908; bh=T05Jd4m+qYybfNoS1tL7mIpz5lKAL4uLs1i1/DTifeE=; 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=PxEMfZBDdPK3I75mVh2M/VjP1xW0CCwssHLYdI5JuTxq78ylhkIcvQp88uOPQipFg 68kWpEQwKc9NDwqvlt+9NhnCJ1QiLPUOt0p6E9EROtoQD7tvNP9HbMeDgRvEc6hd0F LM+VlRHhGO0aL9hYFkytap+3C8NJFb1r+w/VOl3Z78SI267LPak28i/JbZu57PaQBY I28rzfQhVA2MWPjlCVsbS8cnjkEQmA929XMZimSD8M03XZebai5vWNCW4sOv8o+P0N IHjCJI0PlxyQEEZH93QE9E5mQEvDkYD7H/4WBQHgnCKTR1wZPgqhMCVb+6yDAjjOhn pvOlFlwfZNm+g== Date: Fri, 16 Jan 2026 17:48:24 +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 13/27] gpib: gpio: Unify *allocate_private usage Message-ID: <20260116174647.317256-14-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: f870b73092391bc5c89c2fd447b43a721492a64a 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 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/gpio/gpib_bitbang.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpib/gpio/gpib_bitbang.c b/drivers/gpib/gpio/gpib_bitb= ang.c index 62adcab1ddfb..ba99d6c95ddf 100644 --- a/drivers/gpib/gpio/gpib_bitbang.c +++ b/drivers/gpib/gpio/gpib_bitbang.c @@ -1205,14 +1205,15 @@ static void bb_detach(struct gpib_board *board) static int bb_attach(struct gpib_board *board, const struct gpib_board_con= fig *config) { struct bb_priv *priv; - int retval =3D 0; + int retval; =20 dbg_printk(2, "%s\n", "Enter ..."); =20 board->status =3D 0; =20 - if (allocate_private(board)) - return -ENOMEM; + retval =3D allocate_private(board); + if (retval) + return retval; priv =3D board->private_data; priv->direction =3D -1; priv->t1_delay =3D 2000; --=20 2.43.0