Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3481083imu; Sun, 11 Nov 2018 16:05:01 -0800 (PST) X-Google-Smtp-Source: AJdET5caFimemHFwRPwC3uaq2WrniCBRW+zcOqfSxG8roHUJAab6eWZjdNfSPzLDzVA4zQsOwcZk X-Received: by 2002:a17:902:b104:: with SMTP id q4-v6mr18007703plr.5.1541981101740; Sun, 11 Nov 2018 16:05:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981101; cv=none; d=google.com; s=arc-20160816; b=dk5hV9r9JoNCganVRgCqq6dQ7LlM+kkJzUNyku06xt51Fb+Nlj7qMd0FZPwfeqcyqM rDag94gyqCS/7Gxu7mXByYWWJCOMSsc+wMn4asgbLkWtPUm/tpQIzE+TVRVDe1HIzYhS 2qOSnbUyd1Q8UWQMfkEPM0zmyRaIVqbpExfI6ynvlx1IEvG931xGgpychbjhzvXgQCMa dLcy8EErrVFDeQl2uEdLrDIek3Ls/XzwQA2rKfgGsmng0BvO5B+/KcosJM4y7jP4TAJj nEh8DMsrIYBfVybH7wi+d+O3k1ZK7eGaWZePv2y9SAJmSltSbWni514DJ5MS7k+016D1 IELA== 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=DBTpK0o2tEjEDr8yQCRQZVZg5o4cEvMrumR3qJzSxa4=; b=DLw8z9BTKNZCRoD5NA6qhVVicYUG0XsMv0hNR8kKfY25Ehn+d0yiF9W07r7pO8+Nqv +GXQRdaJrkY1O9V1dD4RgD+P4pOaQDLvt1ZxzOpep+yKgWh5HtdKwT8iD2Z0Ap5dIA3e FZsVsw1yQJLL7WWSXqEDE0+W4BtD6nuMEWBMlAK9wUtOdPsOxoYADssVFnSqfRII9ndA wv1fnnN3kviqbbW8F7PsCeK59IwLUgLyD9Qxh4FVWdZh5FWx33L5nMscNszdTxWJr68o kbxGyTI5zDqmS9I5HNqoCliZUex8XY5xp19OkKKs4vkWl8i6M6je7slc+n1zcAJgEVnO aU7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oj74PwKm; 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 1-v6si15560641plu.228.2018.11.11.16.04.46; Sun, 11 Nov 2018 16:05:01 -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=oj74PwKm; 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 S1732317AbeKLJxa (ORCPT + 99 others); Mon, 12 Nov 2018 04:53:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:34210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732132AbeKLIRw (ORCPT ); Mon, 12 Nov 2018 03:17:52 -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 967CB215EA; Sun, 11 Nov 2018 22:27:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975276; bh=7tT4U4+jMCVe0sz9dIW92i7/VGNeMRtoylgtzsrCU/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oj74PwKmprJDHX48VtkOHF/yO1ie0iUQvmr6JhhG/xphnPYUHkcoOMCBZRvtKjaUD Ymrp3B9vFG7Ai0eeiE3Tnb/EKvRmyBF+XDO/I1vF2H1/VRqF3ziGwy4dI7bHGu5XCC H8+VeMsafh0xZVm8Lzm3gaAGEQZAz9/eyCE6immk= 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.19 188/361] dmaengine: dma-jz4780: Return error if not probed from DT Date: Sun, 11 Nov 2018 14:18:55 -0800 Message-Id: <20181111221646.776142841@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-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 @@ -761,6 +761,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;