From: Greg KH <gregkh@linuxfoundation.org>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Hans de Goede <hdegoede@redhat.com>, Jiri Slaby <jslaby@suse.cz>,
linux-kernel@vger.kernel.org,
USB list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] usb-hid-core: Set intfdata to NULL if probe fails
Date: Tue, 22 May 2012 15:10:17 -0700 [thread overview]
Message-ID: <20120522221017.GA12874@kroah.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1205230000070.30445@pobox.suse.cz>
On Wed, May 23, 2012 at 12:00:37AM +0200, Jiri Kosina wrote:
> On Tue, 22 May 2012, Hans de Goede wrote:
>
> > Well then lets work towards making it guaranteed, since I still believe
> > the following holds true:
> > 1) drvdata is for a driver to store a pointer to driver specific data
> > 2) If no driver is bound, there is no driver specific data associated with
> > the device
> > 3) Thus logically drvdata should be NULL if no driver is bound.
> >
> > I'll do a patch for the USB-core to ensure that intfdata gets set to NULL
> > on probe failure.
>
> Hans,
>
> I believe this is a good thing per se, but shouldn't this rather be done
> in driver core, to guarantee that this hold across all buses?
Maybe, but that would require that the driver core set the field to NULL
after every probe call that fails? Is that really necessary to fix up
bugs in different bus subsystems that forget to clean up properly?
I'm not saying it's a bad thing to change it there, it just seems a bit
heavy-handed for a very rare event.
thanks,
greg k-h
next prev parent reply other threads:[~2012-05-22 22:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 19:39 [PATCH] usb-hid-core: Set intfdata to NULL if probe fails Hans de Goede
2012-05-22 7:56 ` Jiri Slaby
2012-05-22 8:09 ` Hans de Goede
2012-05-22 8:29 ` Jiri Slaby
2012-05-22 9:33 ` Hans de Goede
2012-05-22 22:00 ` Jiri Kosina
2012-05-22 22:08 ` Hans de Goede
2012-05-22 22:10 ` Greg KH [this message]
2012-05-22 22:14 ` Jiri Kosina
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=20120522221017.GA12874@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=jkosina@suse.cz \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.