* [PATCH fix?] bcma: use (get|put)_device when probing/removing device driver @ 2017-01-28 13:31 Rafał Miłecki 2017-01-31 7:15 ` [fix?] " Kalle Valo 2017-01-31 7:27 ` Kalle Valo 0 siblings, 2 replies; 3+ messages in thread From: Rafał Miłecki @ 2017-01-28 13:31 UTC (permalink / raw) To: Kalle Valo, linux-wireless; +Cc: Rafał Miłecki From: Rafał Miłecki <rafal@milecki.pl> This allows tracking device state and e.g. makes devm work as expected. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Cc: Stable <stable@vger.kernel.org> --- Kalle: this issue is in bcma since /ever/, so I'm Cc-ing stable without pointing any version. If someone reviewes (you or anyone) you may consider taking it as 3.10 fix. Can someone confirm this patch is OK? --- drivers/bcma/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 2c1798e38abd..38688236b3cd 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -633,8 +633,11 @@ static int bcma_device_probe(struct device *dev) drv); int err = 0; + get_device(dev); if (adrv->probe) err = adrv->probe(core); + if (err) + put_device(dev); return err; } @@ -647,6 +650,7 @@ static int bcma_device_remove(struct device *dev) if (adrv->remove) adrv->remove(core); + put_device(dev); return 0; } -- 2.11.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [fix?] bcma: use (get|put)_device when probing/removing device driver 2017-01-28 13:31 [PATCH fix?] bcma: use (get|put)_device when probing/removing device driver Rafał Miłecki @ 2017-01-31 7:15 ` Kalle Valo 2017-01-31 7:27 ` Kalle Valo 1 sibling, 0 replies; 3+ messages in thread From: Kalle Valo @ 2017-01-31 7:15 UTC (permalink / raw) To: Rafał Miłecki; +Cc: linux-wireless, Rafał Miłecki Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > This allows tracking device state and e.g. makes devm work as expected. > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > Cc: Stable <stable@vger.kernel.org> At this stage of the cycle I think 4.11 is more approriate for this fix. -- https://patchwork.kernel.org/patch/9543283/ Documentation about submitting wireless patches and checking status from patchwork: https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [fix?] bcma: use (get|put)_device when probing/removing device driver 2017-01-28 13:31 [PATCH fix?] bcma: use (get|put)_device when probing/removing device driver Rafał Miłecki 2017-01-31 7:15 ` [fix?] " Kalle Valo @ 2017-01-31 7:27 ` Kalle Valo 1 sibling, 0 replies; 3+ messages in thread From: Kalle Valo @ 2017-01-31 7:27 UTC (permalink / raw) To: Rafał Miłecki; +Cc: linux-wireless, Rafał Miłecki Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > This allows tracking device state and e.g. makes devm work as expected. > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > Cc: Stable <stable@vger.kernel.org> Patch applied to wireless-drivers-next.git, thanks. a971df0b9d04 bcma: use (get|put)_device when probing/removing device driver -- https://patchwork.kernel.org/patch/9543283/ Documentation about submitting wireless patches and checking status from patchwork: https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-31 7:27 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-01-28 13:31 [PATCH fix?] bcma: use (get|put)_device when probing/removing device driver Rafał Miłecki 2017-01-31 7:15 ` [fix?] " Kalle Valo 2017-01-31 7:27 ` Kalle Valo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).