mtd: msm_qpic_nand: Remove the unnecessary (and incorrect) print.
The details of the number of partitions found and MTD partitions
created are already printed out to dmesg log by the functions
parse_mtd_partitions and add_mtd_partitions. More importantly
this line always prints the number of partitions found as 0 which
is incorrect. On successful completion, mtd_device_parse_register
returns 0 and doesn't return the number of partitions found.
So remove this print completely. Also remove the variable n_parts
and use err variable which is more appropriate.
Change-Id: I468f79d1d8bcaf80f24dc55c5db0bad93a66f55b
Signed-off-by: Murali Palnati <palnatim@codeaurora.org>
diff --git a/drivers/mtd/devices/msm_qpic_nand.c b/drivers/mtd/devices/msm_qpic_nand.c
index d709e17..9a6cc80 100644
--- a/drivers/mtd/devices/msm_qpic_nand.c
+++ b/drivers/mtd/devices/msm_qpic_nand.c
@@ -2351,7 +2351,7 @@
{
struct msm_nand_info *info;
struct resource *res;
- int err, n_parts;
+ int err;
struct device_node *pnode;
struct mtd_part_parser_data parser_data;
@@ -2443,10 +2443,10 @@
goto free_bam;
}
parser_data.of_node = pnode;
- n_parts = mtd_device_parse_register(&info->mtd, NULL, &parser_data,
+ err = mtd_device_parse_register(&info->mtd, NULL, &parser_data,
NULL, 0);
- if (n_parts < 0) {
- pr_err("Unable to register MTD partitions %d\n", n_parts);
+ if (err < 0) {
+ pr_err("Unable to register MTD partitions %d\n", err);
goto free_bam;
}
dev_set_drvdata(&pdev->dev, info);
@@ -2455,7 +2455,6 @@
info->nand_phys, info->bam_phys, info->bam_irq);
pr_info("Allocated DMA buffer at virt_addr 0x%p, phys_addr 0x%x\n",
info->nand_chip.dma_virt_addr, info->nand_chip.dma_phys_addr);
- pr_info("Found %d MTD partitions\n", n_parts);
goto out;
free_bam:
msm_nand_bam_free(info);