diff options
author | Olof Johansson <olof@lixom.net> | 2020-01-16 15:57:09 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2020-01-16 15:57:11 -0800 |
commit | 25e3e8119ae9218670b60bee39863ff6b223fa05 (patch) | |
tree | f19955af74709a6ffaf2280e949d1d8a737999bf | |
parent | dee0be5c2138cee65706a939d03a366b790c4baa (diff) | |
parent | a25e29bd0fe9be33491b3816d2d7b1137d5eeaec (diff) |
Merge tag 'omap-for-v5.6/sdma-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt
Fix omap sdma handling for missing auxdata for v5.6 merge window
Turns out I was overly optimistic about making platform data optional, and
we still need it to pass various quirk flags. If the platform data is missing
for whatever reason, we will currently try to access non-existing data later
on.
* tag 'omap-for-v5.6/sdma-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
dmaengine: ti: omap-dma: don't allow a null od->plat pointer to be dereferenced
Link: https://lore.kernel.org/r/pull-1579200367-372444@atomide.com
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | drivers/dma/ti/omap-dma.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c index fc8f7b2fc7b3..a014ab96e673 100644 --- a/drivers/dma/ti/omap-dma.c +++ b/drivers/dma/ti/omap-dma.c @@ -1658,8 +1658,10 @@ static int omap_dma_probe(struct platform_device *pdev) if (conf) { od->cfg = conf; od->plat = dev_get_platdata(&pdev->dev); - if (!od->plat) - dev_warn(&pdev->dev, "no sdma auxdata needed?\n"); + if (!od->plat) { + dev_err(&pdev->dev, "omap_system_dma_plat_info is missing"); + return -ENODEV; + } } else { od->cfg = &default_cfg; |