diff options
-rw-r--r-- | drivers/mtd/nand/lpc32xx_slc.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c index 5f2039446bf0..53a6742e3da3 100644 --- a/drivers/mtd/nand/lpc32xx_slc.c +++ b/drivers/mtd/nand/lpc32xx_slc.c | |||
@@ -725,10 +725,8 @@ static struct lpc32xx_nand_cfg_slc *lpc32xx_parse_dt(struct device *dev) | |||
725 | struct device_node *np = dev->of_node; | 725 | struct device_node *np = dev->of_node; |
726 | 726 | ||
727 | ncfg = devm_kzalloc(dev, sizeof(*ncfg), GFP_KERNEL); | 727 | ncfg = devm_kzalloc(dev, sizeof(*ncfg), GFP_KERNEL); |
728 | if (!ncfg) { | 728 | if (!ncfg) |
729 | dev_err(dev, "could not allocate memory for NAND config\n"); | ||
730 | return NULL; | 729 | return NULL; |
731 | } | ||
732 | 730 | ||
733 | of_property_read_u32(np, "nxp,wdr-clks", &ncfg->wdr_clks); | 731 | of_property_read_u32(np, "nxp,wdr-clks", &ncfg->wdr_clks); |
734 | of_property_read_u32(np, "nxp,wwidth", &ncfg->wwidth); | 732 | of_property_read_u32(np, "nxp,wwidth", &ncfg->wwidth); |
@@ -772,10 +770,8 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) | |||
772 | 770 | ||
773 | /* Allocate memory for the device structure (and zero it) */ | 771 | /* Allocate memory for the device structure (and zero it) */ |
774 | host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); | 772 | host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); |
775 | if (!host) { | 773 | if (!host) |
776 | dev_err(&pdev->dev, "failed to allocate device structure\n"); | ||
777 | return -ENOMEM; | 774 | return -ENOMEM; |
778 | } | ||
779 | host->io_base_dma = rc->start; | 775 | host->io_base_dma = rc->start; |
780 | 776 | ||
781 | host->io_base = devm_ioremap_resource(&pdev->dev, rc); | 777 | host->io_base = devm_ioremap_resource(&pdev->dev, rc); |
@@ -858,7 +854,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) | |||
858 | host->data_buf = devm_kzalloc(&pdev->dev, host->dma_buf_len, | 854 | host->data_buf = devm_kzalloc(&pdev->dev, host->dma_buf_len, |
859 | GFP_KERNEL); | 855 | GFP_KERNEL); |
860 | if (host->data_buf == NULL) { | 856 | if (host->data_buf == NULL) { |
861 | dev_err(&pdev->dev, "Error allocating memory\n"); | ||
862 | res = -ENOMEM; | 857 | res = -ENOMEM; |
863 | goto err_exit2; | 858 | goto err_exit2; |
864 | } | 859 | } |