* [PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource()
@ 2016-09-24 12:02 Wei Yongjun
2016-09-30 0:06 ` Corey Minyard
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-09-24 12:02 UTC (permalink / raw)
To: Corey Minyard; +Cc: Wei Yongjun, openipmi-developer, linux-kernel
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource()
2016-09-24 12:02 [PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource() Wei Yongjun
@ 2016-09-30 0:06 ` Corey Minyard
0 siblings, 0 replies; 2+ messages in thread
From: Corey Minyard @ 2016-09-30 0:06 UTC (permalink / raw)
To: Wei Yongjun, Corey Minyard; +Cc: Wei Yongjun, openipmi-developer, linux-kernel
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);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-30 0:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-24 12:02 [PATCH -next] ipmi/bt-bmc: remove redundant return value check of platform_get_resource() Wei Yongjun
2016-09-30 0:06 ` Corey Minyard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).