Input: synaptics-rmi4 - remove check of Non-NULL array
authorAndrew Duggan <aduggan@synaptics.com>
Fri, 18 Mar 2016 00:06:24 +0000 (17:06 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 18 Mar 2016 00:15:56 +0000 (17:15 -0700)
Originally the irq_mask member of rmi_function was a pointer. Then it was
switched to being a zero length array. However, the checks for a NULL
pointer where not removed.

Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_driver.c

index da38f0ad80ed3879a89420dd9be1d8c139614437..faa295ec4f313a0f629fa3f2fa9ce5267c929b10 100644 (file)
@@ -126,7 +126,7 @@ static void process_one_interrupt(struct rmi_driver_data *data,
                return;
 
        fh = to_rmi_function_handler(fn->dev.driver);
-       if (fn->irq_mask && fh->attention) {
+       if (fh->attention) {
                bitmap_and(data->fn_irq_bits, data->irq_status, fn->irq_mask,
                                data->irq_count);
                if (!bitmap_empty(data->fn_irq_bits, data->irq_count))
@@ -172,8 +172,7 @@ int rmi_process_interrupt_requests(struct rmi_device *rmi_dev)
         * use irq_chip.
         */
        list_for_each_entry(entry, &data->function_list, node)
-               if (entry->irq_mask)
-                       process_one_interrupt(data, entry);
+               process_one_interrupt(data, entry);
 
        if (data->input)
                input_sync(data->input);