Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp168903imd; Wed, 31 Oct 2018 16:42:29 -0700 (PDT) X-Google-Smtp-Source: AJdET5caQ8fHr+o6ttut1P/W4zJT/shdFpeG2ZFS/kHRkwAnhey7b3zh742oEm8kGIGTfU+4MjDC X-Received: by 2002:a63:1520:: with SMTP id v32-v6mr5066732pgl.150.1541029349737; Wed, 31 Oct 2018 16:42:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541029349; cv=none; d=google.com; s=arc-20160816; b=qTk8EI4fWKbjZDZSIyPh09z3SuYJxAGP+ECabx0593xQpCyvpUQ1mxTI83VQlAUR4S lJP4d+bTVMeGT8SoRhTi3hiD/L5wnLMudcz/ki21/lxWmrs02zwu/50bHsi1d1kTncho XGbAKJqlkzXJXY8sSB+6IzyC73JnRAWiUDBA+l65XyGZ5+oS+fbNcf+PqwOECfnEGCSd ME7PIcBOBU7Fc+YymkssXli42+VZWdKxRDhmRZJkfHOaxUrix+h/z6iN9teY5qJggtWo nzGsE+tgtAObrSA9qrs6gRj3ZArTswCbH6s3hsx7bIKXFuhRlJIyYYEIdM2UfN5yrB1M x2oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=eguSJ4fuOoCc6081GW37hvjFE4TISH30knYdOnw2ks8=; b=kMqLUfmqh/Axw3oAd4r2AHPcBPwBX10uG+M3ZiNYWT9XCMU1DBoNGAToa6t88yCx7v fgon8m5sqbalqOTBznkaCJrgD+/Lycsgrk3BKxyuUduZ0YfoY3Xnvd2lbg9VlUI8CC1e yVUoJp7Wfjw1UPFOHuXCLaJHy0VOngSmYDwyVMlRyoT+/KyswOWSj3MdlmhrCCQ0R03G kKqNO8+Z2PHwnXz5KPkuoZMoSJKbLR959PqjQ2UvCUJC9wA7FzrUnRcBXWxZiOq9bFeS W3nRYuCSbOqpVD8/9rconihFbM5QOZW9oedS/XMjq3f0zhOeMMGsZYMq4Ne9yH47O5OA gJmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HahWUUId; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7-v6si27141764plz.23.2018.10.31.16.42.14; Wed, 31 Oct 2018 16:42:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HahWUUId; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729411AbeKAIID (ORCPT + 99 others); Thu, 1 Nov 2018 04:08:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:56450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729304AbeKAIIC (ORCPT ); Thu, 1 Nov 2018 04:08:02 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F50420821; Wed, 31 Oct 2018 23:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027271; bh=ZzJU/mOIbCwL51xMpX6SClB1NK63OmoOYUoKxGiLkPM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HahWUUIdrKt/khsAw8Z28o6ysIgPY8NPq5f54c4wsX415oG3grMGImM7STEP6AXcM KT26vNi6ZwrMmuSzcglfcuiwByoI0bUa4y7XecA/og2BBOGLeXPzd6U6/Oph9nEK52 rsFqTiUK9yXzMW7HGcLNyM85VIhwKt7B0kperzSQ= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Paul Cercueil , Vinod Koul , Sasha Levin Subject: [PATCH AUTOSEL 4.19 144/146] dmaengine: dma-jz4780: Return error if not probed from DT Date: Wed, 31 Oct 2018 19:05:39 -0400 Message-Id: <20181031230541.28822-144-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031230541.28822-1-sashal@kernel.org> References: <20181031230541.28822-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Cercueil [ Upstream commit 54f919a04cf221bc1601d1193682d4379dacacbd ] 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 Tested-by: Mathieu Malaterre Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/dma-jz4780.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c index 85820a2d69d4..987899610b46 100644 --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c @@ -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; -- 2.17.1