lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260116174647.317256-1-dominik.karol.piatkowski@protonmail.com>
Date: Fri, 16 Jan 2026 17:47:25 +0000
From: Dominik Karol Piątkowski <dominik.karol.piatkowski@...tonmail.com>
To: Dave Penkler <dpenkler@...il.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Michael Rubin <matchstick@...erthere.org>, Dan Carpenter <dan.carpenter@...aro.org>
Cc: linux-kernel@...r.kernel.org, Dominik Karol Piątkowski <dominik.karol.piatkowski@...tonmail.com>
Subject: [PATCH v3 00/27] gpib: Unify *allocate_private

Recently, gpib driver got out of staging area. There is still a bit of work that
can be done to improve it.

Use the return value of *allocate_private in calling code as early return value
in case of error.

Return -ENOMEM instead of -1 in *allocate_private in case of memory allocation
failure.

While at it, replace kmalloc/memset pair to kzalloc in *allocate_private.

Change

if (retval < 0)
        return retval;

into

if (retval)
        return retval;

as it is more fitting in this case.

v2:
- Replace kmalloc/memset pairs to kzalloc.
v3:
- Improve changelog of each commit
- Split commits into smaller pieces
- Change `(retval < 0)` to `(retval)`

Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@...tonmail.com>

Dominik Karol Piątkowski (27):
  gpib: agilent_82350b: Unify *allocate_private usage
  gpib: agilent_82357a: Fix the *allocate_private retval check
  gpib: cb7210: Replace kmalloc/memset to kzalloc in *allocate_private
  gpib: cb7210: Unify *allocate_private usage
  gpib: cec: Replace kmalloc/memset to kzalloc in *allocate_private
  gpib: cec: Unify *allocate_private return value
  gpib: cec: Unify *allocate_private usage
  gpib: eastwood: Replace kmalloc/memset to kzalloc in *allocate_private
  gpib: eastwood: Fix the *allocate_private retval check
  gpib: fmh_gpib: Replace kmalloc/memset to kzalloc in *allocate_private
  gpib: fmh_gpib: Fix the *allocate_private retval check
  gpib: gpio: Unify *allocate_private return value
  gpib: gpio: Unify *allocate_private usage
  gpib: hp_82335: Unify *allocate_private return value
  gpib: hp_82335: Unify *allocate_private usage
  gpib: hp_82341: Unify *allocate_private usage
  gpib: ines: Replace kmalloc/memset to kzalloc in *allocate_private
  gpib: ines: Unify *allocate_private return value
  gpib: ines: Unify *allocate_private usage
  gpib: ni_usb: Replace kmalloc/memset to kzalloc in *allocate_private
  gpib: ni_usb: Fix the *allocate_private retval check
  gpib: pc2: Replace kmalloc/memset to kzalloc in *allocate_private
  gpib: pc2: Unify *allocate_private return value
  gpib: pc2: Unify *allocate_private usage
  gpib: tnt4882: Replace kmalloc/memset to kzalloc in *allocate_private
  gpib: tnt4882: Unify *allocate_private return value
  gpib: tnt4882: Unify *allocate_private usage

 drivers/gpib/agilent_82350b/agilent_82350b.c |  5 +++--
 drivers/gpib/agilent_82357a/agilent_82357a.c |  2 +-
 drivers/gpib/cb7210/cb7210.c                 |  9 +++++----
 drivers/gpib/cec/cec_gpib.c                  | 11 ++++++-----
 drivers/gpib/eastwood/fluke_gpib.c           |  5 ++---
 drivers/gpib/fmh_gpib/fmh_gpib.c             |  5 ++---
 drivers/gpib/gpio/gpib_bitbang.c             |  9 +++++----
 drivers/gpib/hp_82335/hp82335.c              |  7 ++++---
 drivers/gpib/hp_82341/hp_82341.c             |  5 +++--
 drivers/gpib/ines/ines_gpib.c                | 11 ++++++-----
 drivers/gpib/ni_usb/ni_usb_gpib.c            |  5 ++---
 drivers/gpib/pc2/pc2_gpib.c                  | 11 ++++++-----
 drivers/gpib/tnt4882/tnt4882_gpib.c          | 20 +++++++++++---------
 13 files changed, 56 insertions(+), 49 deletions(-)

-- 
2.43.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ