Commit 7c7ff885 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Michael Ellerman

powerpc/spufs: Fix the type of ret in spufs_arch_write_note

Both the ->dump method and snprintf return an int.  So switch to an
int and properly handle errors from ->dump.

Fixes: 5456ffde ("powerpc/spufs: simplify spufs core dumping")
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200610085554.5647-1-hch@lst.de
parent 201220bb
...@@ -118,7 +118,7 @@ static int spufs_arch_write_note(struct spu_context *ctx, int i, ...@@ -118,7 +118,7 @@ static int spufs_arch_write_note(struct spu_context *ctx, int i,
size_t sz = spufs_coredump_read[i].size; size_t sz = spufs_coredump_read[i].size;
char fullname[80]; char fullname[80];
struct elf_note en; struct elf_note en;
size_t ret; int ret;
sprintf(fullname, "SPU/%d/%s", dfd, spufs_coredump_read[i].name); sprintf(fullname, "SPU/%d/%s", dfd, spufs_coredump_read[i].name);
en.n_namesz = strlen(fullname) + 1; en.n_namesz = strlen(fullname) + 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment