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

mtd: make register_mtd_parser return void

register_mtd_parser never fails; hence make it return void.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>

authored by

Axel Lin and committed by
Brian Norris
6e14a61d cf3b2b1e

+17 -22
+2 -1
drivers/mtd/afs.c
··· 264 264 265 265 static int __init afs_parser_init(void) 266 266 { 267 - return register_mtd_parser(&afs_parser); 267 + register_mtd_parser(&afs_parser); 268 + return 0; 268 269 } 269 270 270 271 static void __exit afs_parser_exit(void)
+2 -1
drivers/mtd/ar7part.c
··· 139 139 140 140 static int __init ar7_parser_init(void) 141 141 { 142 - return register_mtd_parser(&ar7_parser); 142 + register_mtd_parser(&ar7_parser); 143 + return 0; 143 144 } 144 145 145 146 static void __exit ar7_parser_exit(void)
+2 -1
drivers/mtd/bcm47xxpart.c
··· 243 243 244 244 static int __init bcm47xxpart_init(void) 245 245 { 246 - return register_mtd_parser(&bcm47xxpart_mtd_parser); 246 + register_mtd_parser(&bcm47xxpart_mtd_parser); 247 + return 0; 247 248 } 248 249 249 250 static void __exit bcm47xxpart_exit(void)
+2 -1
drivers/mtd/bcm63xxpart.c
··· 221 221 222 222 static int __init bcm63xx_cfe_parser_init(void) 223 223 { 224 - return register_mtd_parser(&bcm63xx_cfe_parser); 224 + register_mtd_parser(&bcm63xx_cfe_parser); 225 + return 0; 225 226 } 226 227 227 228 static void __exit bcm63xx_cfe_parser_exit(void)
+2 -1
drivers/mtd/cmdlinepart.c
··· 395 395 { 396 396 if (mtdparts) 397 397 mtdpart_setup(mtdparts); 398 - return register_mtd_parser(&cmdline_parser); 398 + register_mtd_parser(&cmdline_parser); 399 + return 0; 399 400 } 400 401 401 402 static void __exit cmdline_parser_exit(void)
+1 -3
drivers/mtd/mtdpart.c
··· 672 672 673 673 #define put_partition_parser(p) do { module_put((p)->owner); } while (0) 674 674 675 - int register_mtd_parser(struct mtd_part_parser *p) 675 + void register_mtd_parser(struct mtd_part_parser *p) 676 676 { 677 677 spin_lock(&part_parser_lock); 678 678 list_add(&p->list, &part_parsers); 679 679 spin_unlock(&part_parser_lock); 680 - 681 - return 0; 682 680 } 683 681 EXPORT_SYMBOL_GPL(register_mtd_parser); 684 682
+3 -12
drivers/mtd/ofpart.c
··· 173 173 174 174 static int __init ofpart_parser_init(void) 175 175 { 176 - int rc; 177 - rc = register_mtd_parser(&ofpart_parser); 178 - if (rc) 179 - goto out; 180 - 181 - rc = register_mtd_parser(&ofoldpart_parser); 182 - if (!rc) 183 - return 0; 184 - 185 - deregister_mtd_parser(&ofoldpart_parser); 186 - out: 187 - return rc; 176 + register_mtd_parser(&ofpart_parser); 177 + register_mtd_parser(&ofoldpart_parser); 178 + return 0; 188 179 } 189 180 190 181 static void __exit ofpart_parser_exit(void)
+2 -1
drivers/mtd/redboot.c
··· 300 300 301 301 static int __init redboot_parser_init(void) 302 302 { 303 - return register_mtd_parser(&redboot_parser); 303 + register_mtd_parser(&redboot_parser); 304 + return 0; 304 305 } 305 306 306 307 static void __exit redboot_parser_exit(void)
+1 -1
include/linux/mtd/partitions.h
··· 76 76 struct mtd_part_parser_data *); 77 77 }; 78 78 79 - extern int register_mtd_parser(struct mtd_part_parser *parser); 79 + extern void register_mtd_parser(struct mtd_part_parser *parser); 80 80 extern void deregister_mtd_parser(struct mtd_part_parser *parser); 81 81 82 82 int mtd_is_partition(const struct mtd_info *mtd);