Skip to content

Commit

Permalink
ASoC: fsl_asrc: Remove of_device_get_match_data() error check
Browse files Browse the repository at this point in the history
The only way this driver can be probed is via devicetree, which always
provides driver data.

Remove the unneeded of_device_get_match_data() error check, as it
can never fail.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210118123815.1630882-4-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Jan 20, 2021
1 parent 4245017 commit 214172a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions sound/soc/fsl/fsl_asrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,11 +1083,6 @@ static int fsl_asrc_probe(struct platform_device *pdev)
}

asrc_priv->soc = of_device_get_match_data(&pdev->dev);
if (!asrc_priv->soc) {
dev_err(&pdev->dev, "failed to get soc data\n");
return -ENODEV;
}

asrc->use_edma = asrc_priv->soc->use_edma;
asrc->get_dma_channel = fsl_asrc_get_dma_channel;
asrc->request_pair = fsl_asrc_request_pair;
Expand Down

0 comments on commit 214172a

Please sign in to comment.