mirror of
https://github.com/torvalds/linux.git
synced 2026-05-04 22:43:04 -04:00
ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions
We can check for the desc->ops directly in the probe functions, the ops is not used directly in the functions. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521092804.3721324-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
aa736700f4
commit
fd979ec12e
@@ -116,14 +116,11 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
||||
const struct sof_dev_desc *desc =
|
||||
(const struct sof_dev_desc *)pci_id->driver_data;
|
||||
struct snd_sof_pdata *sof_pdata;
|
||||
const struct snd_sof_dsp_ops *ops;
|
||||
int ret;
|
||||
|
||||
dev_dbg(&pci->dev, "PCI DSP detected");
|
||||
|
||||
/* get ops for platform */
|
||||
ops = desc->ops;
|
||||
if (!ops) {
|
||||
if (!desc->ops) {
|
||||
dev_err(dev, "error: no matching PCI descriptor ops\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user