From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andrew Duggan <aduggan@synaptics.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Linus Walleij <linus.walleij@linaro.org>,
Benjamin Tissoires <benjamin.tissoires@gmail.com>,
Christopher Heiny <cheiny@synaptics.com>,
Stephen Chandler Paul <cpaul@redhat.com>
Subject: Re: [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound
Date: Mon, 9 Nov 2015 15:16:10 -0800 [thread overview]
Message-ID: <20151109231610.GF9155@dtor-ws> (raw)
In-Reply-To: <1446766645-30350-1-git-send-email-aduggan@synaptics.com>
On Thu, Nov 05, 2015 at 03:37:25PM -0800, Andrew Duggan wrote:
> From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>
> If the device has been registered but is not populated, we should not
> process any incoming interrupt.
> Make sure the pointers we are following are valid.
Why are the interrupts enabled when device is not ready?
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Tested-by: Andrew Duggan <aduggan@synaptics.com>
> ---
> drivers/input/rmi4/rmi_driver.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
> index 2fdc7e8..fe5f2f9 100644
> --- a/drivers/input/rmi4/rmi_driver.c
> +++ b/drivers/input/rmi4/rmi_driver.c
> @@ -279,6 +279,9 @@ int rmi_process_interrupt_requests(struct rmi_device *rmi_dev)
> struct rmi_function *entry;
> int error;
>
> + if (!data || !data->f01_container || !data->irq_status)
> + return 0;
> +
> error = rmi_read_block(rmi_dev,
> data->f01_container->fd.data_base_addr + 1,
> data->irq_status, data->num_of_irq_regs);
> --
> 2.1.4
>
--
Dmitry
next prev parent reply other threads:[~2015-11-09 23:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 23:37 [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound Andrew Duggan
2015-11-09 12:58 ` Linus Walleij
2015-11-09 23:16 ` Dmitry Torokhov [this message]
2015-11-10 9:11 ` Benjamin Tissoires
-- strict thread matches above, loose matches on Subject: below --
2015-11-05 23:34 [PATCH 00/26] Consolidate patches and add support for new devices Andrew Duggan
2015-11-05 23:34 ` [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound Andrew Duggan
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=20151109231610.GF9155@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=aduggan@synaptics.com \
--cc=benjamin.tissoires@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=cheiny@synaptics.com \
--cc=cpaul@redhat.com \
--cc=linus.walleij@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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 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).