Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit feb35745 authored by YueHaibing's avatar YueHaibing Committed by Ulf Hansson
Browse files

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: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarJoey Pabalinas <joeypabalinas@gmail.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 67b4ff9f
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -965,10 +965,7 @@ static int jz4740_mmc_request_gpios(struct jz4740_mmc_host *host,


	host->power = devm_gpiod_get_optional(&pdev->dev, "power",
	host->power = devm_gpiod_get_optional(&pdev->dev, "power",
					      GPIOD_OUT_HIGH);
					      GPIOD_OUT_HIGH);
	if (IS_ERR(host->power))
	return PTR_ERR_OR_ZERO(host->power);
		return PTR_ERR(host->power);

	return 0;
}
}


static const struct of_device_id jz4740_mmc_of_match[] = {
static const struct of_device_id jz4740_mmc_of_match[] = {