lkml.org 
[lkml]   [2012]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/6 v2] usb/gadget/pch_udc: Fix wrong return value
    Date
    ISSUE:
    If the return value of pch_udc_pcd_init() is False, the return value of this function is unsettled.
    Since pch_udc_pcd_init() always returns 0, there is not actually the issue.

    CAUSE:
    If pch_udc_pcd_init() is True, the variable, retval, is not set for an appropriate value.

    Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
    ---
    V2: Divide into 6 patches
    ---
    drivers/usb/gadget/pch_udc.c | 4 +++-
    1 files changed, 3 insertions(+), 1 deletions(-)

    diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c
    index a4f8b08..78a2fce 100644
    --- a/drivers/usb/gadget/pch_udc.c
    +++ b/drivers/usb/gadget/pch_udc.c
    @@ -2920,8 +2920,10 @@ static int pch_udc_probe(struct pci_dev *pdev,
    }
    pch_udc = dev;
    /* initialize the hardware */
    - if (pch_udc_pcd_init(dev))
    + if (pch_udc_pcd_init(dev)) {
    + retval = -ENODEV;
    goto finished;
    + }
    if (request_irq(pdev->irq, pch_udc_isr, IRQF_SHARED, KBUILD_MODNAME,
    dev)) {
    dev_err(&pdev->dev, "%s: request_irq(%d) fail\n", __func__,
    --
    1.7.4.4


    \
     
     \ /
      Last update: 2012-01-12 03:35    [W:0.022 / U:0.876 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site