]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: soc: sunxi: fix error processing on base address when claiming
authorIcenowy Zheng <icenowy@aosc.io>
Wed, 9 Aug 2017 08:56:25 +0000 (16:56 +0800)
committerChen-Yu Tsai <wens@csie.org>
Fri, 18 Aug 2017 06:30:19 +0000 (14:30 +0800)
commit84179293ddd7b70e134d005f313979b0979a900e
tree1a75fa9a83b368420a737c08143c744706daee78
parentb262fc173f1ce0dfd0e065d912555d16e57501d2
drivers: soc: sunxi: fix error processing on base address when claiming

When claiming SRAM, if the base is set to an error, it means that the
SRAM controller has been probed, but failed to remap the controller
memory zone. If the base is zero, thus the SRAM controller should be not
probed at all, and it should return -EPROBE_DEFER. However, currently we
returned -EPROBE_DEFER in the former situation, and ignored the latter
situation (which will lead to the kernel to panic).

Fix the behavior on abnormal base address processing when claiming.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Fixes: 35c552b6fb96 ("drivers: soc: sunxi: Introduce SoC driver to map
      SRAMs")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
drivers/soc/sunxi/sunxi_sram.c