mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
ASoC: SDCA: Fix NULL vs IS_ERR() bug in sdca_dev_register_functions()
The sdca_dev_register() function never returns NULL, it returns error
pointers on error. Fix the error checking to match.
Fixes: 4496d1c65b ("ASoC: SDCA: add function devices")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/aSW1UOgMCiQIaZG8@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
a13744f628
commit
80339b3823
|
|
@ -96,8 +96,8 @@ int sdca_dev_register_functions(struct sdw_slave *slave)
|
|||
|
||||
func_dev = sdca_dev_register(&slave->dev,
|
||||
&sdca_data->function[i]);
|
||||
if (!func_dev)
|
||||
return -ENODEV;
|
||||
if (IS_ERR(func_dev))
|
||||
return PTR_ERR(func_dev);
|
||||
|
||||
sdca_data->function[i].func_dev = func_dev;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user