Thread (32 messages) 32 messages, 5 authors, 2015-11-04

Re: [PATCH 04/11] Input: synaptics-rmi4 - prevent oopses when irq arrives while the device is not bound

From: Andrew Duggan <hidden>
Date: 2015-07-02 17:50:48
Also in: lkml

On 06/23/2015 12:17 PM, Benjamin Tissoires wrote:
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 <redacted>
---
Reviewed-by: Andrew Duggan <redacted>
quoted hunk ↗ jump to hunk
  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);
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help