ASoC: max98373: Fix return check for devm_regmap_init_sdw()
devm_regmap_init_sdw() returns a valid pointer on success or ERR_PTR on failure which should be checked with IS_ERR. Also use PTR_ERR for returning error codes. Reported-by: Takashi Iwai <tiwai@suse.de> Fixes: 56a5b791 ("ASoC: codecs: max98373: add SoundWire support") Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200826163340.3249608-2-vkoul@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment