OSDN Git Service

of/fdt: Don't clear initial_boot_params if fdt_check_header() fails
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 29 Oct 2014 18:15:00 +0000 (12:15 -0600)
committerGrant Likely <grant.likely@linaro.org>
Tue, 4 Nov 2014 16:43:09 +0000 (16:43 +0000)
commit50ba08f301a1b0310775deeed00c9b24ba75fe8a
treec1bae1ae585a16bde52d2901f952507fe452cee3
parentb75b276bead4850c86e60747babe09be5c13d4d1
of/fdt: Don't clear initial_boot_params if fdt_check_header() fails

If the device tree pointer is NULL, early_init_dt_verify() fails, leaving
initial_boot_params unchanged.  If the device tree pointer is non-NULL but
invalid, early_init_dt_verify() again fails but this time it also clears
initial_boot_params.

Leave initial_boot_params unchanged if the device tree pointer is invalid.
This doesn't fix a bug, but it makes the behavior more consistent and
easier to analyze.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
drivers/of/fdt.c