]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
powerpc/spufs: Fix the type of ret in spufs_arch_write_note
authorChristoph Hellwig <hch@lst.de>
Wed, 10 Jun 2020 08:55:54 +0000 (10:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:26:42 +0000 (08:26 +0200)
[ Upstream commit 7c7ff885c7bce40a487e41c68f1dac14dd2c8033 ]

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

Fixes: 5456ffdee666 ("powerpc/spufs: simplify spufs core dumping")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200610085554.5647-1-hch@lst.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/cell/spufs/coredump.c

index 3b75e8f60609cbd0fd7cd2416c587c387ed57de7..014d1c045bc3cf71aa53be07a07ef97471adc4f3 100644 (file)
@@ -105,7 +105,7 @@ static int spufs_arch_write_note(struct spu_context *ctx, int i,
        size_t sz = spufs_coredump_read[i].size;
        char fullname[80];
        struct elf_note en;
-       size_t ret;
+       int ret;
 
        sprintf(fullname, "SPU/%d/%s", dfd, spufs_coredump_read[i].name);
        en.n_namesz = strlen(fullname) + 1;