Bug 81651 - mm/memory.c:3608: possible cut'n'paste error ?
Summary: mm/memory.c:3608: possible cut'n'paste error ?
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Andrew Morton
Depends on:
Reported: 2014-08-04 11:46 UTC by David Binderman
Modified: 2014-08-21 18:50 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.16
Tree: Mainline
Regression: No


Description David Binderman 2014-08-04 11:46:58 UTC
[linux-3.16/mm/memory.c:3608]: (style) Statements following return, break, continue, goto or throw will never be executed.

Source code is

            if (ret <= 0)
            bytes = ret;
Comment 1 Andrey Utkin 2014-08-04 19:38:33 UTC
This is not necessarily an error. Not the most simple code to comprehend, too, though.
I didn't investigate deeply the meaning of code, but the code makes sense with with and without CONFIG_HAVE_IOREMAP_PROT being defined. The code and those #ifdef/#endif lines were added in single commit, and that commit is not huge, so it is well-thought I hope.

Note You need to log in before you can comment on or make changes to this bug.