Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3431249imu; Sun, 11 Nov 2018 14:58:08 -0800 (PST) X-Google-Smtp-Source: AJdET5c4tpW8hcbiC0Fz7oxx81kYdQ2cWxBTOaqQqib6WfoJNxO8WkclZIPtQVtjgOj5K65CI/5q X-Received: by 2002:a63:310:: with SMTP id 16mr14921166pgd.79.1541977088275; Sun, 11 Nov 2018 14:58:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977088; cv=none; d=google.com; s=arc-20160816; b=GHuNP0tJldNENOfTFGVSPZbxlXYAf+EFzR/YKkPxjrOV+WEvmWgVM2e+5N86h7KaEp 5wHNp3y9UwgCw+FSTO5TRgzHVn4frSYT9HS3VW47bZDqgVg8RF3Y26RiC3rNqdYY9l/7 +OatMukofoIX72rNUSm+m0nGEdlVjgrGA8/HU+ursAvdLTP2Nxc6rcwzQp9En65y4kmX XlzYcNfw8fm4aGcq38OTUi2IF7+UcBYCuDds9rglPDOe4Ua79Q5czWm84U2uCHmx0/Sa PS84WKvEYHkpOkW7+kdcNmy+7fhuKFsVEOdlJAhzl6nqX232FrlRkTFQcOKMDUtFmrxr Jhuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fty+xXI3ymhvJACzucVl3QHwW+5Y3lm206PKoSjlpcA=; b=rabA4Yj9klsKntTr0/khU+1wnR5bCi5nB/LFm7tafRV5miba0Bs1FdInZ2Idr3ZJ+Q 66h6vOYjYZ7ojW6V90ygoTJ1oguyIcMYfFSzxlML6EjM/idFxkAGPclSJnT5ZtrZXII+ bWBFhSXnbchuw+t81nAWhsA8hydd0QDu4J8tMvjkUm9Di9itxAc0b4Id6CuuLPFaQLRS s2YG6q3IsTnKqq28q43v3iKv8YBV7Iw9Xcxl9LUAhBcDXdaNoX+thrKgClzJdpIe8Cg5 q33Iw62qc7hsBzq7HY8xOokmJRGx5Uy2PbsR9uTkfDecTRJe4JQOIvwz38/BNZZDYU3J xPXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wbUpezQz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b124-v6si16266373pfa.135.2018.11.11.14.57.53; Sun, 11 Nov 2018 14:58:08 -0800 (PST) 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=wbUpezQz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389941AbeKLIrh (ORCPT + 99 others); Mon, 12 Nov 2018 03:47:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:54324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403813AbeKLIWp (ORCPT ); Mon, 12 Nov 2018 03:22:45 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E0DA421707; Sun, 11 Nov 2018 22:32:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975568; bh=2xgasrsPX0FixoXl03c7sQwu5amsGtDkDYhvsp/6HvU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wbUpezQzuSQEc52n73oAP4LEDo3rIqS91udc0alnaOQhhin3jUI0+v29J2/tlI8Pt QtkpNPhdAg6/CgvK44NKBdY9oZlxCmEfOgtKmamAooCa9UU/BLCxN826LNjO6UKlXn PT+JMb+2sGOZss1FbRJBp92aAqKMSPZOQiBPx0W8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Cercueil , Mathieu Malaterre , Vinod Koul , Sasha Levin Subject: [PATCH 4.14 106/222] dmaengine: dma-jz4780: Return error if not probed from DT Date: Sun, 11 Nov 2018 14:23:23 -0800 Message-Id: <20181111221657.341611475@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/dma/dma-jz4780.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c @@ -754,6 +754,11 @@ static int jz4780_dma_probe(struct platf 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;