提交 feb35745 编写于 作者: Y YueHaibing 提交者: Ulf Hansson

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: NYueHaibing <yuehaibing@huawei.com>
Acked-by: NJoey Pabalinas <joeypabalinas@gmail.com>
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 67b4ff9f
......@@ -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[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册