Skip to content

Commit 18096cb

Browse files
Peter Ujfalusibroonie
authored andcommitted
ASoC: ti: davinci-mcasp: Use &pdev->dev for early dev_warn
At this point mcasp->dev is not initialized and we would have NULL pointer dereference if we would have failed to get the mem memory resource by name. Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 827ed8a commit 18096cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/ti/davinci-mcasp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
21552155

21562156
mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
21572157
if (!mem) {
2158-
dev_warn(mcasp->dev,
2158+
dev_warn(&pdev->dev,
21592159
"\"mpu\" mem resource not found, using index 0\n");
21602160
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
21612161
if (!mem) {

0 commit comments

Comments
 (0)