summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/addnote.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/addnote.c')
-rw-r--r--arch/powerpc/boot/addnote.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/boot/addnote.c b/arch/powerpc/boot/addnote.c
index 9d9f6f334d3c..3da3e2b1b51b 100644
--- a/arch/powerpc/boot/addnote.c
+++ b/arch/powerpc/boot/addnote.c
@@ -223,7 +223,11 @@ main(int ac, char **av)
PUT_16(E_PHNUM, np + 2);
/* write back */
- lseek(fd, (long) 0, SEEK_SET);
+ i = lseek(fd, (long) 0, SEEK_SET);
+ if (i < 0) {
+ perror("lseek");
+ exit(1);
+ }
i = write(fd, buf, n);
if (i < 0) {
perror("write");