Skip to content

Commit

Permalink
drivers: spi: pl022: correcting error check condition
Browse files Browse the repository at this point in the history
Only negative return values of pinctrl_apply_state are errors.

Signed-off-by: TOKITA Hiroshi <[email protected]>
  • Loading branch information
soburi authored and carlescufi committed Oct 20, 2023
1 parent bb1cfba commit 90bd786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi_pl022.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ static int spi_pl022_init(const struct device *dev)

#if defined(CONFIG_PINCTRL)
ret = pinctrl_apply_state(cfg->pincfg, PINCTRL_STATE_DEFAULT);
if (ret) {
if (ret < 0) {
LOG_ERR("Failed to apply pinctrl state");
return ret;
}
Expand Down

0 comments on commit 90bd786

Please sign in to comment.