OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
827ed8a
)
ASoC: ti: davinci-mcasp: Use &pdev->dev for early dev_warn
author
Peter Ujfalusi
<peter.ujfalusi@ti.com>
Thu, 8 Oct 2020 08:54:00 +0000
(11:54 +0300)
committer
Mark Brown
<broonie@kernel.org>
Thu, 8 Oct 2020 20:16:52 +0000
(21:16 +0100)
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 <peter.ujfalusi@ti.com>
Link:
https://lore.kernel.org/r/20201008085400.19944-1-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ti/davinci-mcasp.c
patch
|
blob
|
history
diff --git
a/sound/soc/ti/davinci-mcasp.c
b/sound/soc/ti/davinci-mcasp.c
index
3ffdd0f
..
a6b72ad
100644
(file)
--- a/
sound/soc/ti/davinci-mcasp.c
+++ b/
sound/soc/ti/davinci-mcasp.c
@@
-2155,7
+2155,7
@@
static int davinci_mcasp_probe(struct platform_device *pdev)
mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
if (!mem) {
- dev_warn(
mcasp
->dev,
+ dev_warn(
&pdev
->dev,
"\"mpu\" mem resource not found, using index 0\n");
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!mem) {