device tree: Fix cppcheck warning

Fix this cppcheck warning:

Checking device_tree.c...
device_tree.c:216: style:
 Checking if unsigned variable 'r' is less than zero.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
