08 Oct, 2012

1 commit

  • The function sh_irda_probe() return 0 for success and negative value
    for most of its internal tests failures. There is one exception
    that is error case going to err_mem_4:. For this error case, the
    function abort its success execution path, but returns non negative
    value, making it difficult for a caller function to notice the error.

    This patch fixes the error case that do not return negative value.

    This was found by Coccinelle, but the code change was made by hand.
    This patch is not robot generated.

    A simplified version of the semantic match that finds this problem is
    as follows: (http://coccinelle.lip6.fr/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    Peter Senna Tschudin
     

15 Apr, 2012

1 commit


28 Nov, 2011

1 commit


16 Sep, 2011

3 commits


11 Aug, 2011

1 commit

  • This patch fixup below build error on sh_irda

    sh_irda.c: In function 'sh_irda_write':
    sh_irda.c:174: error: implicit declaration of function 'iowrite16'
    sh_irda.c: In function 'sh_irda_read':
    sh_irda.c:184: error: implicit declaration of function 'ioread16'
    sh_irda.c: At top level:
    sh_irda.c:492: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_irda_irq'
    sh_irda.c: In function 'sh_irda_probe':
    sh_irda.c:776: error: implicit declaration of function 'ioremap_nocache'
    sh_irda.c:776: warning: assignment makes pointer from integer without a cast
    sh_irda.c:811: error: implicit declaration of function 'request_irq'
    sh_irda.c:811: error: 'sh_irda_irq' undeclared (first use in this function)
    sh_irda.c:811: error: (Each undeclared identifier is reported only once
    sh_irda.c:811: error: for each function it appears in.)
    sh_irda.c:811: error: 'IRQF_DISABLED' undeclared (first use in this function)
    sh_irda.c:825: error: implicit declaration of function 'iounmap'

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: David S. Miller

    Kuninori Morimoto
     

19 Jan, 2011

1 commit


07 Aug, 2010

1 commit


04 Aug, 2010

1 commit


16 Jul, 2010

1 commit


07 Apr, 2010

1 commit