Skip to content

Commit feb3574

Browse files
YueHaibingstorulf
authored andcommitted
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 <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>
1 parent 67b4ff9 commit feb3574

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/mmc/host/jz4740_mmc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -965,10 +965,7 @@ static int jz4740_mmc_request_gpios(struct jz4740_mmc_host *host,
965965

966966
host->power = devm_gpiod_get_optional(&pdev->dev, "power",
967967
GPIOD_OUT_HIGH);
968-
if (IS_ERR(host->power))
969-
return PTR_ERR(host->power);
970-
971-
return 0;
968+
return PTR_ERR_OR_ZERO(host->power);
972969
}
973970

974971
static const struct of_device_id jz4740_mmc_of_match[] = {

0 commit comments

Comments
 (0)