mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
ASoC: DaVinci: Delete an error message for a failed memory allocation in two functions
Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
5771a8c088
commit
dc09233908
@ -1602,8 +1602,6 @@ static struct davinci_mcasp_pdata *davinci_mcasp_set_pdata_from_of(
|
|||||||
pdata = devm_kmemdup(&pdev->dev, match->data, sizeof(*pdata),
|
pdata = devm_kmemdup(&pdev->dev, match->data, sizeof(*pdata),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!pdata) {
|
if (!pdata) {
|
||||||
dev_err(&pdev->dev,
|
|
||||||
"Failed to allocate memory for pdata\n");
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
return pdata;
|
return pdata;
|
||||||
}
|
}
|
||||||
|
@ -210,11 +210,8 @@ static int davinci_vcif_probe(struct platform_device *pdev)
|
|||||||
davinci_vcif_dev = devm_kzalloc(&pdev->dev,
|
davinci_vcif_dev = devm_kzalloc(&pdev->dev,
|
||||||
sizeof(struct davinci_vcif_dev),
|
sizeof(struct davinci_vcif_dev),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!davinci_vcif_dev) {
|
if (!davinci_vcif_dev)
|
||||||
dev_dbg(&pdev->dev,
|
|
||||||
"could not allocate memory for private data\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
/* DMA tx params */
|
/* DMA tx params */
|
||||||
davinci_vcif_dev->davinci_vc = davinci_vc;
|
davinci_vcif_dev->davinci_vc = davinci_vc;
|
||||||
|
Loading…
Reference in New Issue
Block a user