Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1263613
| From | Andrew Duggan <aduggan@synaptics.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound |
| Date | 2015-11-06 00:40 +0100 |
| Message-ID | <qrCin-57c-51@gated-at.bofh.it> (permalink) |
| References | <qrCim-57c-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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. 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/26] Consolidate patches and add support for new devices Andrew Duggan <aduggan@synaptics.com> - 2015-11-06 00:40 +0100
[PATCH 04/26] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound Andrew Duggan <aduggan@synaptics.com> - 2015-11-06 00:40 +0100
Re: [PATCH 00/26] Consolidate patches and add support for new devices Linus Walleij <linus.walleij@linaro.org> - 2015-11-09 13:50 +0100
Re: [PATCH 00/26] Consolidate patches and add support for new devices Andrew Duggan <aduggan@synaptics.com> - 2015-11-10 00:00 +0100
Re: [PATCH 00/26] Consolidate patches and add support for new devices Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-11-10 00:10 +0100
csiph-web