lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.13.y-ckt 91/95] firmware/ihex2fw.c: restore missing default in switch statement
    Date
    3.13.11-ckt21 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Nicolas Iooss <nicolas.iooss_linux@m4x.org>

    commit d43698e8abb58a6ac47d16e0f47bb55f452e4fc4 upstream.

    Commit 2473238eac95 ("ihex: add support for CS:IP/EIP records") removes
    the "default:" statement in the switch block, making the "return
    usage();" line dead code and ihex2fw silently ignoring unknown options.
    Restore this statement.

    This bug was found by building with HOSTCC=clang and adding
    -Wunreachable-code-return to HOSTCFLAGS.

    Fixes: 2473238eac95 ("ihex: add support for CS:IP/EIP records")
    Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
    Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    ---
    firmware/ihex2fw.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/firmware/ihex2fw.c b/firmware/ihex2fw.c
    index cf38e15..08d90e2 100644
    --- a/firmware/ihex2fw.c
    +++ b/firmware/ihex2fw.c
    @@ -86,6 +86,7 @@ int main(int argc, char **argv)
    case 'j':
    include_jump = 1;
    break;
    + default:
    return usage();
    }
    }
    --
    1.9.1


    \
     
     \ /
      Last update: 2015-05-27 21:41    [W:4.051 / U:0.916 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site