Skip to content

Commit 870b10f

Browse files
jhovoldbroonie
authored andcommitted
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: 4f8ef33 ("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>
1 parent 61a50d6 commit 870b10f

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

sound/soc/sdw_utils/soc_sdw_utils.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,10 +1414,6 @@ static int is_sdca_endpoint_present(struct device *dev,
14141414
}
14151415

14161416
slave = dev_to_sdw_dev(sdw_dev);
1417-
if (!slave) {
1418-
ret = -EINVAL;
1419-
goto put_device;
1420-
}
14211417

14221418
/* Make sure BIOS provides SDCA properties */
14231419
if (!slave->sdca_data.interface_revision) {

0 commit comments

Comments
 (0)