Thread (15 messages) 15 messages, 4 authors, 2014-12-15

[PATCH v2 1/6] ASoC: dwc: Remove unnecessary debug messages and tests

From: lars@metafoo.de (Lars-Peter Clausen)
Date: 2014-12-12 09:33:30
Also in: alsa-devel, lkml

On 12/12/2014 10:31 AM, Joe Perches wrote:
[...]
quoted
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "no i2s resource defined\n");
-		return -ENODEV;
-	}
-
Why delete this?
quoted
  	dev->i2s_base = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(dev->i2s_base)) {
-		dev_err(&pdev->dev, "ioremap fail for i2s_region\n");
+	if (IS_ERR(dev->i2s_base))
  		return PTR_ERR(dev->i2s_base);
-	}
or this?
devm_ioremap_resource both checks if res is NULL and does also its own error 
reporting. So the code in the driver is redundant.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help