From: YueHaibing Date: Sat, 1 Dec 2018 01:45:46 +0000 (+0000) Subject: mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios() X-Git-Tag: v5.0-rc1~108^2~40 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=feb357458baa0bd0f644a5bd790841555b959b48;p=linux.git 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 --- 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[] = {