Message ID | 1516188430-145326-1-git-send-email-weiyongjun1@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Acked-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com> On 01/17/2018 12:27 PM, Wei Yongjun wrote: > devm_ioremap_resource() already checks if the resource is NULL, so > remove the unnecessary platform_get_resource() error check. > > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> > --- > drivers/dma/stm32-dmamux.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c > index d5db0f6..4dbb30c 100644 > --- a/drivers/dma/stm32-dmamux.c > +++ b/drivers/dma/stm32-dmamux.c > @@ -253,9 +253,6 @@ static int stm32_dmamux_probe(struct platform_device *pdev) > } > > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - if (!res) > - return -ENODEV; > - > iomem = devm_ioremap_resource(&pdev->dev, res); > if (IS_ERR(iomem)) > return PTR_ERR(iomem); > > -- > To unsubscribe from this list: send the line "unsubscribe dmaengine" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
On Wed, Jan 17, 2018 at 11:27:10AM +0000, Wei Yongjun wrote: > devm_ioremap_resource() already checks if the resource is NULL, so > remove the unnecessary platform_get_resource() error check. Applied, thanks
diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c index d5db0f6..4dbb30c 100644 --- a/drivers/dma/stm32-dmamux.c +++ b/drivers/dma/stm32-dmamux.c @@ -253,9 +253,6 @@ static int stm32_dmamux_probe(struct platform_device *pdev) } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - iomem = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(iomem)) return PTR_ERR(iomem);
devm_ioremap_resource() already checks if the resource is NULL, so remove the unnecessary platform_get_resource() error check. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> --- drivers/dma/stm32-dmamux.c | 3 --- 1 file changed, 3 deletions(-)