From nobody Tue Feb 10 10:54:27 2026 Received: from mail-24416.protonmail.ch (mail-24416.protonmail.ch [109.224.244.16]) (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 4FB212EFD98 for ; Thu, 15 Jan 2026 19:20:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=109.224.244.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768504818; cv=none; b=rjUHIv7z1k9g+Egg3FpF3l5WlUmUXbgCuEjkZGNqIWmouPIN4guvj+f4sDQtIk+vBy6gnP0nQZAIj/w9BIsmSlHvrZp6wVdMBleFySDJmdkDCUM8uANFIFz7LEereciuYHcKLNI1drtPbnVbLFbI0KGE7YAoxAOrwuB10W1WAjI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768504818; c=relaxed/simple; bh=CGrPecDc1OMI3cvDEDRJdSnArOdRkg9/BZSWOm+xhBY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hZibJsZmFNRujOGGlDFsRRaga3vSXAlMEM5KvvaQAUmcZK+GAa7I+euC5/gflupY5+vziRBEF4RkSFaYp2Owyu1oK7c9xuEF6cYSYp4U7uc+eBK4bsc+vJ473H0m4ZJu7Z1vmC5dQa5Of+YN0sGlS7372+BAt1QYN/MKt3p7kPg= 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=w/7vkPqB; arc=none smtp.client-ip=109.224.244.16 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="w/7vkPqB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1768504808; x=1768764008; bh=CGrPecDc1OMI3cvDEDRJdSnArOdRkg9/BZSWOm+xhBY=; 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=w/7vkPqBj2cZuTMoMmAhSBS/qJf+j+zC+4ZwaUqOuoqTGjWaeI7OrjKT2c4tWvI9l SuMwBycxf2T8oh+xcKVpTonYeRe+/lJ319WXxw8GGFB2RkbCmSONefri3H2uvhp3qs EZ4wRRgPh4qWZeKm+4FZcBJoDMLwSGorxRt/jkpBV0Pq4Jz4dhdezdPiWt5mrlIfib uqHol1E+1zRbTWVAynvdL0Z5BVIzCU2HpLAkehIBhC9bpz0DcI+NKpMEcH6HxTUEb+ f7faWmuK3xYx66g/n7t9CaE8yvppQG9IXHiUrETVDOxPdfl2EM0QJylWZ2gsENhXOD u0I2zZ2fqNnXQ== Date: Thu, 15 Jan 2026 19:20:04 +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 v2 01/12] gpib: agilent_82350b: Unify *allocate_private Message-ID: <20260115191925.52268-2-dominik.karol.piatkowski@protonmail.com> In-Reply-To: <20260115191925.52268-1-dominik.karol.piatkowski@protonmail.com> References: <20260115191925.52268-1-dominik.karol.piatkowski@protonmail.com> Feedback-ID: 117888567:user:proton X-Pm-Message-ID: d288a8169ee12a461b4ce3b553e7eea66662b25f 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" Return values for *allocate_private functions as well as calling code in gpib driver are all over the place. Unify them by returning -errno if something fails, zero otherwise. Use the returned value as early return value in case of error. Replace kmalloc/memset pairs to kzalloc. Signed-off-by: Dominik Karol Pi=C4=85tkowski --- v2: Replace kmalloc/memset pairs to kzalloc. drivers/gpib/agilent_82350b/agilent_82350b.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpib/agilent_82350b/agilent_82350b.c b/drivers/gpib/ag= ilent_82350b/agilent_82350b.c index 01a5bb43cd2d..f5f102863e47 100644 --- a/drivers/gpib/agilent_82350b/agilent_82350b.c +++ b/drivers/gpib/agilent_82350b/agilent_82350b.c @@ -599,8 +599,9 @@ static int agilent_82350b_generic_attach(struct gpib_bo= ard *board, =20 board->status =3D 0; =20 - if (agilent_82350b_allocate_private(board)) - return -ENOMEM; + retval =3D agilent_82350b_allocate_private(board); + if (retval < 0) + return retval; a_priv =3D board->private_data; a_priv->using_fifos =3D use_fifos; tms_priv =3D &a_priv->tms9914_priv; --=20 2.43.0