sparc: piggyback: handle invalid image
authorCorentin Labbe <clabbe@baylibre.com>
Wed, 10 Jun 2020 07:55:19 +0000 (07:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jun 2020 22:44:44 +0000 (15:44 -0700)
commit5124b31c1e90797e26710377d04eb005759494a0
tree11718a328be41b541e8b3141f34e2dbd4ea3a5d0
parentc05d042fda889f1e591b9d306482d9c16072dd60
sparc: piggyback: handle invalid image

With an old elftoaout, the generation of tftpboot.img fail with "lseek:
invalid argument".
This is due to offset being negative.

Instead of printing this error message, let's print a better one.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/boot/piggyback.c