]> git.baikalelectronics.ru Git - uboot.git/commit
xilinx: zynqmp: Do not check 0 as invalid return from snprintf
authorMichal Simek <michal.simek@xilinx.com>
Wed, 21 Oct 2020 10:17:44 +0000 (12:17 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 27 Oct 2020 07:13:33 +0000 (08:13 +0100)
commit83169dc6c7f2b466f25a8f822724140205ec94b1
tree9d8e12eb87fbd4337a03da83f88a6a8a3b1c1c00
parent1ba13a3235880493831eba2451d24fe9aa79b6da
xilinx: zynqmp: Do not check 0 as invalid return from snprintf

U-Boot SPL on ZynqMP is using CONFIG_SPL_USE_TINY_PRINTF which doesn't
return any return value and all the time returns 0. That's why
even correct snprintf was returning in SPL chip ID as "unknown".
Change checking condition and allow snprintf to return 0 which is according
manual patch successful return.
"If an output error is encountered, a negative value is returned."

Fixes: 43a138956f7e ("arm64: zynqmp: Get rid of simple_itoa and replace it by snprintf")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynqmp/zynqmp.c