Skip to content

Commit

Permalink
mmc: jz4740: Use PTR_ERR_OR_ZERO in jz4740_mmc_request_gpios()
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
YueHaibing authored and Ulf Hansson committed Dec 17, 2018
1 parent 67b4ff9 commit feb3574
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/mmc/host/jz4740_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit feb3574

Please sign in to comment.