Skip to contentSkip to conversation

hwrng: omap - remove unnecessary OOM messages

PATCH In review Jingoo Han 2 participants 3 messages Apr 29, 2014 – May 8, 2014

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/2 hwrng: omap - remove unnecessary OOM messages

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/char/hw_random/omap-rng.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/char/hw_random/omap-rng.c +1 -3
index 9b89ff4..f66ea25 100644
@@ -369,10 +369,8 @@ static int omap_rng_probe(struct platform_device *pdev)
 	int ret;
 
 	priv = devm_kzalloc(dev, sizeof(struct omap_rng_dev), GFP_KERNEL);
-	if (!priv) {
-		dev_err(&pdev->dev, "could not allocate memory\n");
+	if (!priv)
 		return -ENOMEM;
-	};
 
 	omap_rng_ops.priv = (unsigned long)priv;
 	platform_set_drvdata(pdev, priv);
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/2 hwrng: timeriomem - remove unnecessary OOM messages

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/char/hw_random/timeriomem-rng.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/char/hw_random/timeriomem-rng.c +1 -3
index 439ff8b..b6ab9ac 100644
@@ -120,10 +120,8 @@ static int timeriomem_rng_probe(struct platform_device *pdev)
 	/* Allocate memory for the device structure (and zero it) */
 	priv = devm_kzalloc(&pdev->dev,
 			sizeof(struct timeriomem_rng_private_data), GFP_KERNEL);
-	if (!priv) {
-		dev_err(&pdev->dev, "failed to allocate device structure.\n");
+	if (!priv)
 		return -ENOMEM;
-	}
 
 	platform_set_drvdata(pdev, priv);
 
Signature · 1 line
1.7.10.4