lkml.org 
[lkml]   [2012]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/9] mei: factor some bits of code outside if blocks
    Date
    From: "Devin J. Pohly" <djpohly@gmail.com>

    Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
    ---
    drivers/staging/mei/interrupt.c | 15 ++++-----------
    1 file changed, 4 insertions(+), 11 deletions(-)

    diff --git a/drivers/staging/mei/interrupt.c b/drivers/staging/mei/interrupt.c
    index 4914589..d1291ae 100644
    --- a/drivers/staging/mei/interrupt.c
    +++ b/drivers/staging/mei/interrupt.c
    @@ -1336,9 +1336,6 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
    }
    ret = _mei_irq_thread_cmpl(dev, slots, pos, cl,
    cmpl_list);
    - if (ret)
    - return ret;
    -
    } else if (cl == &dev->iamthif_cl) {
    /* IAMTHIF IOCTL */
    dev_dbg(&dev->pdev->dev, "complete amthi write cb.\n");
    @@ -1352,11 +1349,9 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
    }
    ret = _mei_irq_thread_cmpl_iamthif(dev, slots, pos, cl,
    cmpl_list);
    - if (ret)
    - return ret;
    -
    }
    -
    + if (ret)
    + return ret;
    }
    return 0;
    }
    @@ -1523,13 +1518,11 @@ irqreturn_t mei_interrupt_thread_handler(int irq, void *dev_id)
    * start sending messages.
    */
    mei_host_start_message(dev);
    - mutex_unlock(&dev->device_lock);
    - return IRQ_HANDLED;
    } else {
    dev_dbg(&dev->pdev->dev, "FW not ready.\n");
    - mutex_unlock(&dev->device_lock);
    - return IRQ_HANDLED;
    }
    + mutex_unlock(&dev->device_lock);
    + return IRQ_HANDLED;
    }
    /* check slots avalable for reading */
    slots = mei_count_full_read_slots(dev);
    --
    1.7.9.2


    \
     
     \ /
      Last update: 2012-02-24 02:41    [W:0.021 / U:92.652 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site