Skip to content
Snippets Groups Projects
Unverified Commit 60ea3db3 authored by Jinjie Ruan's avatar Jinjie Ruan Committed by Mark Brown
Browse files

spi: at91-usart: Use PTR_ERR_OR_ZERO() to simplify code


Return PTR_ERR_OR_ZERO() instead of return 0 or PTR_ERR() to
simplify code.

Signed-off-by: default avatarJinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230822124643.987079-1-ruanjinjie@huawei.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1c351c23
No related branches found
No related tags found
No related merge requests found
......@@ -485,10 +485,7 @@ static int at91_usart_gpio_setup(struct platform_device *pdev)
cs_gpios = devm_gpiod_get_array_optional(&pdev->dev, "cs", GPIOD_OUT_LOW);
if (IS_ERR(cs_gpios))
return PTR_ERR(cs_gpios);
return 0;
return PTR_ERR_OR_ZERO(cs_gpios);
}
static int at91_usart_spi_probe(struct platform_device *pdev)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment