]> git.baikalelectronics.ru Git - uboot.git/commit
fru: ops: Return error from checksum if data is all zero's
authorAshok Reddy Soma <ashok.reddy.soma@xilinx.com>
Wed, 23 Feb 2022 14:00:57 +0000 (15:00 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 7 Mar 2022 07:48:21 +0000 (08:48 +0100)
commit93a3fb765e3bb1412538b8aaf8746c671c14cbb3
tree645272da58ac9ea924ada8dd28b4e1553aaa5afb
parent2f7465f8fe2813016d43f064ff8c8ce511adbeba
fru: ops: Return error from checksum if data is all zero's

fru_checksum function is simply adding all the bytes and returning the
sum. If the data passed to this function is all zero's then it will
return 0, and the functions calling this api will assume that checksum
is correct. Ideally this is not good. Fix this by returning error if all
the data is 0's.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/ac0366fe55c60a818a3f9ed33d96826c817d5520.1645624855.git.michal.simek@xilinx.com
board/xilinx/common/fru_ops.c