From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org,
Mika Westerberg <mika.westerberg@linux.intel.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] i2c: designware-pci: Fix BUG_ON during device removal
Date: Fri, 14 Feb 2020 11:26:37 +0200 [thread overview]
Message-ID: <a3ddc7c3-5cd5-e338-d776-a98b7deae9d2@linux.intel.com> (raw)
In-Reply-To: <20200213171102.GC10400@smile.fi.intel.com>
On 2/13/20 7:11 PM, Andy Shevchenko wrote:
> On Thu, Feb 13, 2020 at 05:18:54PM +0100, Wolfram Sang wrote:
>> On Thu, Feb 13, 2020 at 05:15:03PM +0200, Jarkko Nikula wrote:
>>> Function i2c_dw_pci_remove() -> pci_free_irq_vectors() ->
>>> pci_disable_msi() -> free_msi_irqs() will throw a BUG_ON() for MSI
>>> enabled device since the driver has not released the requested IRQ before
>>> calling the pci_free_irq_vectors().
>>>
>>> Here driver requests an IRQ using devm_request_irq() but automatic
>>> release happens only after remove callback. Fix this by explicitly
>>> freeing the IRQ before calling pci_free_irq_vectors().
>>
>> Does it make sense to keep devm for irq handling, then?
>
I thought about it and decided devm still saves one line of code in
drivers/i2c/busses/i2c-designware-platdrv.c: dw_i2c_plat_remove().
> Only for sake of better error handling in error path in the ->probe().
>
Yeah, that too.
--
Jarkko
next prev parent reply other threads:[~2020-02-14 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-13 15:15 [PATCH] i2c: designware-pci: Fix BUG_ON during device removal Jarkko Nikula
2020-02-13 16:18 ` Wolfram Sang
2020-02-13 17:11 ` Andy Shevchenko
2020-02-14 9:26 ` Jarkko Nikula [this message]
2020-02-13 17:10 ` Andy Shevchenko
2020-03-10 9:34 ` Wolfram Sang
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=a3ddc7c3-5cd5-e338-d776-a98b7deae9d2@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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.