aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2025-12-19 15:27:15 +0100
committerMark Brown <broonie@kernel.org>2025-12-22 09:14:53 +0000
commit870b10f61d527fec594e0888f18cc4f32c47433d (patch)
treea493b035df79b2e50c8028a6969e3b73c63378e3 /sound
parent61a50d6f58b41e8a7e68d8fc8fc6bfbe30d790d8 (diff)
ASoC: soc_sdw_utils: drop bogus container_of() error handling
The dev_to_sdw_dev() helper uses container_of() to return the containing soundwire device structure of its pointer argument and will never return NULL. Fixes: 4f8ef33dd44a ("ASoC: soc_sdw_utils: skip the endpoint that doesn't present") Cc: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20251219142715.19254-4-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sdw_utils/soc_sdw_utils.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
index f169d95895ea..bf382aa07e92 100644
--- a/sound/soc/sdw_utils/soc_sdw_utils.c
+++ b/sound/soc/sdw_utils/soc_sdw_utils.c
@@ -1414,10 +1414,6 @@ static int is_sdca_endpoint_present(struct device *dev,
}
slave = dev_to_sdw_dev(sdw_dev);
- if (!slave) {
- ret = -EINVAL;
- goto put_device;
- }
/* Make sure BIOS provides SDCA properties */
if (!slave->sdca_data.interface_revision) {