diff mbox

[19/23] mtd: lpc32xx_slc: Remove unnecessary OOM messages

Message ID 009601cf01e9$365bb020$a3131060$%han@samsung.com
State Accepted
Commit 8ecb66ba39546f17d0338c3ba5ae56e9ffb3639c
Headers show

Commit Message

Jingoo Han Dec. 26, 2013, 3:18 a.m. UTC
The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/mtd/nand/lpc32xx_slc.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

stigge@antcom.de Dec. 26, 2013, 10:30 a.m. UTC | #1
On 26/12/13 04:18, Jingoo Han wrote:
> The site-specific OOM messages are unnecessary, because they
> duplicate the MM subsystem generic OOM message.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Acked-by: Roland Stigge <stigge@antcom.de>

> ---
>  drivers/mtd/nand/lpc32xx_slc.c |    9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c
> index 5f20394..53a6742 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)
>  	struct device_node *np = dev->of_node;
>  
>  	ncfg = devm_kzalloc(dev, sizeof(*ncfg), GFP_KERNEL);
> -	if (!ncfg) {
> -		dev_err(dev, "could not allocate memory for NAND config\n");
> +	if (!ncfg)
>  		return NULL;
> -	}
>  
>  	of_property_read_u32(np, "nxp,wdr-clks", &ncfg->wdr_clks);
>  	of_property_read_u32(np, "nxp,wwidth", &ncfg->wwidth);
> @@ -772,10 +770,8 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
>  
>  	/* Allocate memory for the device structure (and zero it) */
>  	host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
> -	if (!host) {
> -		dev_err(&pdev->dev, "failed to allocate device structure\n");
> +	if (!host)
>  		return -ENOMEM;
> -	}
>  	host->io_base_dma = rc->start;
>  
>  	host->io_base = devm_ioremap_resource(&pdev->dev, rc);
> @@ -858,7 +854,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
>  	host->data_buf = devm_kzalloc(&pdev->dev, host->dma_buf_len,
>  				      GFP_KERNEL);
>  	if (host->data_buf == NULL) {
> -		dev_err(&pdev->dev, "Error allocating memory\n");
>  		res = -ENOMEM;
>  		goto err_exit2;
>  	}
>
diff mbox

Patch

diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c
index 5f20394..53a6742 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)
 	struct device_node *np = dev->of_node;
 
 	ncfg = devm_kzalloc(dev, sizeof(*ncfg), GFP_KERNEL);
-	if (!ncfg) {
-		dev_err(dev, "could not allocate memory for NAND config\n");
+	if (!ncfg)
 		return NULL;
-	}
 
 	of_property_read_u32(np, "nxp,wdr-clks", &ncfg->wdr_clks);
 	of_property_read_u32(np, "nxp,wwidth", &ncfg->wwidth);
@@ -772,10 +770,8 @@  static int lpc32xx_nand_probe(struct platform_device *pdev)
 
 	/* Allocate memory for the device structure (and zero it) */
 	host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
-	if (!host) {
-		dev_err(&pdev->dev, "failed to allocate device structure\n");
+	if (!host)
 		return -ENOMEM;
-	}
 	host->io_base_dma = rc->start;
 
 	host->io_base = devm_ioremap_resource(&pdev->dev, rc);
@@ -858,7 +854,6 @@  static int lpc32xx_nand_probe(struct platform_device *pdev)
 	host->data_buf = devm_kzalloc(&pdev->dev, host->dma_buf_len,
 				      GFP_KERNEL);
 	if (host->data_buf == NULL) {
-		dev_err(&pdev->dev, "Error allocating memory\n");
 		res = -ENOMEM;
 		goto err_exit2;
 	}