Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/hypfs: Cocci spatch "ptr_ret.spatch"

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Thomas Meyer and committed by
Martin Schwidefsky
5eba9bb8 735e849f

+2 -6
+2 -6
arch/s390/hypfs/hypfs_diag.c
··· 651 651 } 652 652 diag224_idx2name(cpu_info__ctidx(diag204_info_type, cpu_info), buffer); 653 653 rc = hypfs_create_str(sb, cpu_dir, "type", buffer); 654 - if (IS_ERR(rc)) 655 - return PTR_ERR(rc); 656 - return 0; 654 + return PTR_RET(rc); 657 655 } 658 656 659 657 static void *hypfs_create_lpar_files(struct super_block *sb, ··· 700 702 return PTR_ERR(rc); 701 703 diag224_idx2name(phys_cpu__ctidx(diag204_info_type, cpu_info), buffer); 702 704 rc = hypfs_create_str(sb, cpu_dir, "type", buffer); 703 - if (IS_ERR(rc)) 704 - return PTR_ERR(rc); 705 - return 0; 705 + return PTR_RET(rc); 706 706 } 707 707 708 708 static void *hypfs_create_phys_files(struct super_block *sb,