ASoC: amd: acp: Fix return value check in acp_machine_select()
In case of error, platform_device_register_data() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: e646b51f ("ASoC: amd: acp: Add callback for machine driver on ACP") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20211027065228.833825-1-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment