ipq806x: fix boot hang if cmdline contains words with r in the middle ipq806x-next
authorJonas Gorski <jonas.gorski@gmail.com>
Thu, 28 Jul 2016 16:08:35 +0000 (18:08 +0200)
committerJonas Gorski <jonas.gorski@gmail.com>
Thu, 28 Jul 2016 16:09:58 +0000 (18:09 +0200)
commite2077b6f42f9faa457e03485cf1da2aa3729593b
treedfd3e5bbdb35a8f8088ab43cf137d5e6bca28af1
parent846eca673f818300a3c1729158b4c110cf316e38
ipq806x: fix boot hang if cmdline contains words with r in the middle

The ATB DTB mangle code will enter an infinite loop if it encounters a
word in the command line that contains an r in the middle of the word.

Fix this by increasing ptr everytime before invoking strchr, ot avoid
finding the same r again.

This fixes booting at least on Netgear R7500v1, which contains
"ubi.mtd=rootfs" in its commandline, triggering the misbehaviour.

Fixes: 0ddcbee26151 ("ipq806x: activate ATAG DTB mangle and EA8500 rootblock in dts")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
target/linux/ipq806x/patches-4.4/996-ATAG_DTB_COMPAT_CMDLINE_MANGLE.patch