public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Lixu Zhang <lixu.zhang@intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Johan Hovold <johan@kernel.org>
Subject: [PATCH 0/5] USB: drop redundant references
Date: Thu,  5 Mar 2026 12:15:06 +0100	[thread overview]
Message-ID: <20260305111511.18386-1-johan@kernel.org> (raw)

Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop redundant references to reduce cargo culting, make it easier to
spot drivers where an extra reference is needed, and reduce the risk of
memory leaks when drivers fail to release them.

Johan


Johan Hovold (5):
  USB: cypress_cy7c63: drop redundant device reference
  USB: cytherm: drop redundant device reference
  USB: ljca: drop redundant interface reference
  USB: trancevibrator: drop redundant device reference
  USB: usbsevseg: drop redundant device reference

 drivers/usb/misc/cypress_cy7c63.c |  4 +---
 drivers/usb/misc/cytherm.c        |  4 +---
 drivers/usb/misc/trancevibrator.c |  3 +--
 drivers/usb/misc/usb-ljca.c       | 15 +++++----------
 drivers/usb/misc/usbsevseg.c      |  3 +--
 5 files changed, 9 insertions(+), 20 deletions(-)

-- 
2.52.0


             reply	other threads:[~2026-03-05 11:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-05 11:15 Johan Hovold [this message]
2026-03-05 11:15 ` [PATCH 1/5] USB: cypress_cy7c63: drop redundant device reference Johan Hovold
2026-03-05 11:15 ` [PATCH 2/5] USB: cytherm: " Johan Hovold
2026-03-05 11:15 ` [PATCH 3/5] USB: ljca: drop redundant interface reference Johan Hovold
2026-03-05 13:18   ` Sakari Ailus
2026-03-05 11:15 ` [PATCH 4/5] USB: trancevibrator: drop redundant device reference Johan Hovold
2026-03-05 11:15 ` [PATCH 5/5] USB: usbsevseg: " Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260305111511.18386-1-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lixu.zhang@intel.com \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox