diff options
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
| -rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 56ec1d301ac2..f395bbc7c354 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -1602,8 +1602,6 @@ static struct davinci_mcasp_pdata *davinci_mcasp_set_pdata_from_of(  		pdata = devm_kmemdup(&pdev->dev, match->data, sizeof(*pdata),  				     GFP_KERNEL);  		if (!pdata) { -			dev_err(&pdev->dev, -				"Failed to allocate memory for pdata\n");  			ret = -ENOMEM;  			return pdata;  		} @@ -1853,6 +1851,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)  	mcasp->context.xrsr_regs = devm_kzalloc(&pdev->dev,  					sizeof(u32) * mcasp->num_serializer,  					GFP_KERNEL); +	if (!mcasp->context.xrsr_regs) { +		ret = -ENOMEM; +		goto err; +	}  #endif  	mcasp->serial_dir = pdata->serial_dir;  	mcasp->version = pdata->version;  |