* [PATCH -next] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios()
@ 2018-12-01 1:45 YueHaibing
2018-12-01 1:55 ` Joey Pabalinas
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: YueHaibing @ 2018-12-01 1:45 UTC (permalink / raw)
To: kernel-janitors
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/mmc/host/jz4740_mmc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 6f7a99e..8eca423 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -975,10 +975,7 @@ static int jz4740_mmc_request_gpios(struct jz4740_mmc_host *host,
host->power = devm_gpiod_get_optional(&pdev->dev, "power",
GPIOD_OUT_HIGH);
- if (IS_ERR(host->power))
- return PTR_ERR(host->power);
-
- return 0;
+ return PTR_ERR_OR_ZERO(host->power);
}
static const struct of_device_id jz4740_mmc_of_match[] = {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios()
2018-12-01 1:45 [PATCH -next] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios() YueHaibing
@ 2018-12-01 1:55 ` Joey Pabalinas
2018-12-01 12:58 ` Linus Walleij
2018-12-05 14:24 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Joey Pabalinas @ 2018-12-01 1:55 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]
On Sat, Dec 01, 2018 at 01:45:46AM +0000, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Joey Pabalinas <joeypabalinas@gmail.com>
On Sat, Dec 01, 2018 at 01:45:46AM +0000, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/mmc/host/jz4740_mmc.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
> index 6f7a99e..8eca423 100644
> --- a/drivers/mmc/host/jz4740_mmc.c
> +++ b/drivers/mmc/host/jz4740_mmc.c
> @@ -975,10 +975,7 @@ static int jz4740_mmc_request_gpios(struct jz4740_mmc_host *host,
>
> host->power = devm_gpiod_get_optional(&pdev->dev, "power",
> GPIOD_OUT_HIGH);
> - if (IS_ERR(host->power))
> - return PTR_ERR(host->power);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(host->power);
> }
>
> static const struct of_device_id jz4740_mmc_of_match[] = {
--
Cheers,
Joey Pabalinas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios()
2018-12-01 1:45 [PATCH -next] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios() YueHaibing
2018-12-01 1:55 ` Joey Pabalinas
@ 2018-12-01 12:58 ` Linus Walleij
2018-12-05 14:24 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2018-12-01 12:58 UTC (permalink / raw)
To: kernel-janitors
On Sat, Dec 1, 2018 at 2:37 AM YueHaibing <yuehaibing@huawei.com> wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Ah, smart.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios()
2018-12-01 1:45 [PATCH -next] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios() YueHaibing
2018-12-01 1:55 ` Joey Pabalinas
2018-12-01 12:58 ` Linus Walleij
@ 2018-12-05 14:24 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2018-12-05 14:24 UTC (permalink / raw)
To: kernel-janitors
On Sat, 1 Dec 2018 at 02:37, YueHaibing <yuehaibing@huawei.com> wrote:
>
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/jz4740_mmc.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
> index 6f7a99e..8eca423 100644
> --- a/drivers/mmc/host/jz4740_mmc.c
> +++ b/drivers/mmc/host/jz4740_mmc.c
> @@ -975,10 +975,7 @@ static int jz4740_mmc_request_gpios(struct jz4740_mmc_host *host,
>
> host->power = devm_gpiod_get_optional(&pdev->dev, "power",
> GPIOD_OUT_HIGH);
> - if (IS_ERR(host->power))
> - return PTR_ERR(host->power);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(host->power);
> }
>
> static const struct of_device_id jz4740_mmc_of_match[] = {
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-05 14:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-01 1:45 [PATCH -next] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios() YueHaibing
2018-12-01 1:55 ` Joey Pabalinas
2018-12-01 12:58 ` Linus Walleij
2018-12-05 14:24 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox