Message ID | 1352369324-25771-1-git-send-email-sachin.kamat@linaro.org |
---|---|
State | Deferred |
Headers | show |
On Thu, 2012-11-08 at 15:38 +0530, Sachin Kamat wrote: > The return value of s3c2410_nand_add_partition() is not checked for error > or success in the calling function. Hence change the return type to void. > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> This means you should fix the calling function instead hiding errors.
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 295e4be..dfb8636 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -726,15 +726,15 @@ static int s3c24xx_nand_remove(struct platform_device *pdev) return 0; } -static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info, +static void s3c2410_nand_add_partition(struct s3c2410_nand_info *info, struct s3c2410_nand_mtd *mtd, struct s3c2410_nand_set *set) { if (set) mtd->mtd.name = set->name; - return mtd_device_parse_register(&mtd->mtd, NULL, NULL, - set->partitions, set->nr_partitions); + mtd_device_parse_register(&mtd->mtd, NULL, NULL, + set->partitions, set->nr_partitions); } /**
The return value of s3c2410_nand_add_partition() is not checked for error or success in the calling function. Hence change the return type to void. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/mtd/nand/s3c2410.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)