forked from Minki/linux
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
@ -1868,6 +1868,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||
if (irq >= 0) {
|
||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_common",
|
||||
dev_name(&pdev->dev));
|
||||
if (!irq_name) {
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
||||
davinci_mcasp_common_irq_handler,
|
||||
IRQF_ONESHOT | IRQF_SHARED,
|
||||
@ -1885,6 +1889,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||
if (irq >= 0) {
|
||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_rx",
|
||||
dev_name(&pdev->dev));
|
||||
if (!irq_name) {
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
||||
davinci_mcasp_rx_irq_handler,
|
||||
IRQF_ONESHOT, irq_name, mcasp);
|
||||
@ -1900,6 +1908,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||
if (irq >= 0) {
|
||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_tx",
|
||||
dev_name(&pdev->dev));
|
||||
if (!irq_name) {
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
||||
davinci_mcasp_tx_irq_handler,
|
||||
IRQF_ONESHOT, irq_name, mcasp);
|
||||
|
Loading…
Reference in New Issue
Block a user