Skip to content

Commit 7d267dd

Browse files
Wei Yongjunbroonie
authored andcommitted
ASoC: sti: fix return value check in uni_player_parse_dt_audio_glue()
In case of error, the function syscon_regmap_lookup_by_phandle() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 05c1b44 commit 7d267dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/sti/uniperif_player.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,9 +1029,9 @@ static int uni_player_parse_dt_audio_glue(struct platform_device *pdev,
10291029

10301030
regmap = syscon_regmap_lookup_by_phandle(node, "st,syscfg");
10311031

1032-
if (!regmap) {
1032+
if (IS_ERR(regmap)) {
10331033
dev_err(&pdev->dev, "sti-audio-clk-glue syscf not found\n");
1034-
return -EINVAL;
1034+
return PTR_ERR(regmap);
10351035
}
10361036

10371037
player->clk_sel = regmap_field_alloc(regmap, regfield[0]);

0 commit comments

Comments
 (0)