mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
ASoC: davinci-mcasp: Handle return value of devm_kasprintf
devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
befff4fbc2
commit
0c8b794c4a
1 changed files with 12 additions and 0 deletions
|
@ -1868,6 +1868,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||||
if (irq >= 0) {
|
if (irq >= 0) {
|
||||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_common",
|
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_common",
|
||||||
dev_name(&pdev->dev));
|
dev_name(&pdev->dev));
|
||||||
|
if (!irq_name) {
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
||||||
davinci_mcasp_common_irq_handler,
|
davinci_mcasp_common_irq_handler,
|
||||||
IRQF_ONESHOT | IRQF_SHARED,
|
IRQF_ONESHOT | IRQF_SHARED,
|
||||||
|
@ -1885,6 +1889,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||||
if (irq >= 0) {
|
if (irq >= 0) {
|
||||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_rx",
|
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_rx",
|
||||||
dev_name(&pdev->dev));
|
dev_name(&pdev->dev));
|
||||||
|
if (!irq_name) {
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
||||||
davinci_mcasp_rx_irq_handler,
|
davinci_mcasp_rx_irq_handler,
|
||||||
IRQF_ONESHOT, irq_name, mcasp);
|
IRQF_ONESHOT, irq_name, mcasp);
|
||||||
|
@ -1900,6 +1908,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||||
if (irq >= 0) {
|
if (irq >= 0) {
|
||||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_tx",
|
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_tx",
|
||||||
dev_name(&pdev->dev));
|
dev_name(&pdev->dev));
|
||||||
|
if (!irq_name) {
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
||||||
davinci_mcasp_tx_irq_handler,
|
davinci_mcasp_tx_irq_handler,
|
||||||
IRQF_ONESHOT, irq_name, mcasp);
|
IRQF_ONESHOT, irq_name, mcasp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue