From feb357458baa0bd0f644a5bd790841555b959b48 Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Sat, 1 Dec 2018 01:45:46 +0000 Subject: [PATCH] mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios() Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing Acked-by: Joey Pabalinas Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson --- 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 e82b0e14822a..33215d66afa2 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -965,10 +965,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[] = { -- 2.30.2