[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 12 Dec 2014 10:33:23 +0100
From: Lars-Peter Clausen <lars@...afoo.de>
To: Joe Perches <joe@...ches.com>,
Andrew Jackson <andrew.jackson@....com>
CC: Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Rajeev Kumar <rajeevkumar.linux@...il.com>,
Liviu Dudau <Liviu.Dudau@....com>,
Arnd Bergmann <arnd@...db.de>,
linux-arm-kernel@...ts.infradead.org, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/6] ASoC: dwc: Remove unnecessary debug messages and
tests
On 12/12/2014 10:31 AM, Joe Perches wrote:
[...]
>> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> - if (!res) {
>> - dev_err(&pdev->dev, "no i2s resource defined\n");
>> - return -ENODEV;
>> - }
>> -
>
> Why delete this?
>
>> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists