firmware-utils: mkdlinkfw: fix error handling
authorMathias Kresin <dev@kresin.me>
Sat, 5 Jan 2019 06:40:55 +0000 (07:40 +0100)
committerMathias Kresin <dev@kresin.me>
Sun, 13 Jan 2019 17:31:10 +0000 (18:31 +0100)
commitb90b42b52b7c5538d58b51564f8eae4dbcc8c9b9
tree81433850537d3e4fb2c3b8e69c8cedf2498d15cc
parent3590d05ae837b2b6146106a8521913299379559b
firmware-utils: mkdlinkfw: fix error handling

fread() doesn't set errno, ferror need to be used to check for errors.
While at it, check if we read the expect number of elements.

Signed-off-by: Mathias Kresin <dev@kresin.me>
src/mkdlinkfw-lib.c