mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
dmaengine: dma-jz4780: Return error if not probed from DT
[ Upstream commit 54f919a04c ]
The driver calls clk_get() with the clock name set to NULL, which means
that the driver could only work when probed from devicetree. From now
on, we explicitly require the driver to be probed from devicetree.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
128b1b38a6
commit
71e124bd39
|
|
@ -761,6 +761,11 @@ static int jz4780_dma_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
int i, ret;
|
||||
|
||||
if (!dev->of_node) {
|
||||
dev_err(dev, "This driver must be probed from devicetree\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
jzdma = devm_kzalloc(dev, sizeof(*jzdma), GFP_KERNEL);
|
||||
if (!jzdma)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user