Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1490632 > unrolled thread

[PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource()

Started byWei Yongjun <weiyj.lk@gmail.com>
First post2016-09-24 14:10 +0200
Last post2016-09-30 02:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource() Wei Yongjun <weiyj.lk@gmail.com> - 2016-09-24 14:10 +0200
    Re: [PATCH -next] ipmi/bt-bmc: remove redundant return value check of  platform_get_resource() Corey Minyard <tcminyard@gmail.com> - 2016-09-30 02:10 +0200

#1490632 — [PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource()

FromWei Yongjun <weiyj.lk@gmail.com>
Date2016-09-24 14:10 +0200
Subject[PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource()
Message-ID<skTWh-P9-15@gated-at.bofh.it>
From: Wei Yongjun <weiyongjun1@huawei.com>

Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/char/ipmi/bt-bmc.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
index de64bf1..b49e613 100644
--- a/drivers/char/ipmi/bt-bmc.c
+++ b/drivers/char/ipmi/bt-bmc.c
@@ -432,11 +432,6 @@ static int bt_bmc_probe(struct platform_device *pdev)
 	dev_set_drvdata(&pdev->dev, bt_bmc);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "Unable to find resources\n");
-		return -ENXIO;
-	}
-
 	bt_bmc->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(bt_bmc->base))
 		return PTR_ERR(bt_bmc->base);

[toc] | [next] | [standalone]


#1493790 — Re: [PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource()

FromCorey Minyard <tcminyard@gmail.com>
Date2016-09-30 02:10 +0200
SubjectRe: [PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource()
Message-ID<smTyN-2OB-5@gated-at.bofh.it>
In reply to#1490632
Thanks, applied.

-corey

On 09/24/2016 07:02 AM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Remove unneeded error handling on the result of a call
> to platform_get_resource() when the value is passed to
> devm_ioremap_resource().
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>   drivers/char/ipmi/bt-bmc.c | 5 -----
>   1 file changed, 5 deletions(-)
>
> diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
> index de64bf1..b49e613 100644
> --- a/drivers/char/ipmi/bt-bmc.c
> +++ b/drivers/char/ipmi/bt-bmc.c
> @@ -432,11 +432,6 @@ static int bt_bmc_probe(struct platform_device *pdev)
>   	dev_set_drvdata(&pdev->dev, bt_bmc);
>   
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(dev, "Unable to find resources\n");
> -		return -ENXIO;
> -	}
> -
>   	bt_bmc->base = devm_ioremap_resource(&pdev->dev, res);
>   	if (IS_ERR(bt_bmc->base))
>   		return PTR_ERR(bt_bmc->base);
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web