Received: by 10.192.165.148 with SMTP id m20csp4142716imm; Mon, 30 Apr 2018 12:32:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqGZSdQDhBhfs25DMQz6n49Aio3a8UfVxoS5SAcq0YoHnuSa1IE/v/IAXytsj1knMeYzO+N X-Received: by 10.98.113.5 with SMTP id m5mr6978228pfc.167.1525116776161; Mon, 30 Apr 2018 12:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525116776; cv=none; d=google.com; s=arc-20160816; b=lB0NIEoRz+ZeMrW7svF9gN9bFEt5e23IFHEHd09Z6FMigGc+wJCE5ncQPEhNaC6AEk 6Xv/yQgAZRlMMIoyQvwPEuR5MbnPsALRrmi6UI/IA/k9/Fznb1mevpNAOZ9uP0DQutVF /rx3CeR6UKu4TWHYVcwmjzF42jPmPX7kw2FaAMHwVEr/M8shy+DN0LpTwPw2EV4gntyY Uf6fFu5Z46YdZnhwW67sbdu4VsrN1u2DsepP7P4330kGf9mwWtHBbcZUDWeg+MPRWWjA Xmc4/EYoUu52nWBJL7kr9WSlUPYtOeuv6x1wUrtAeEAQgYBvBYWQ5XZ/S34T9hrkbJhG wHLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=SoXlWS/OeVgTDF39EM6722OOMDUONO2Luey6TrXfT/A=; b=O8hGVDrRIHfT7uDZ5QeVHAPnS7WcoEsyyZbzbdU4rZlnVzUvv+Ird7uh3IaO7ArjHv jQuydQ2nwvi085CoVzkkS6haZx5gqbucDsJBCblF3TGglBdVRFohkXcfYfPsWOJA2FU9 UOtKBkNjYugjYsT//sB3yXky6Rd5Uw9Qw+wA7qNp5tndpzbCaJdR5tl4BvYuTc11/a13 K7rwCmRSOUHyjqP8zm90U1EQCIZ+WhAuFNAGFhX4Uu1n2Bw/jO42Q0h/wbfM86XNuuO4 6nFV7CwpF78jx6n8NctxB0Umk7BdmD2GtxLpHDQeZIbCiRDSZK0P4v0w9ZXkevyaQ30F d2JA== ARC-Authentication-Results: i=1; mx.google.com; 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 f59-v6si8056099plf.38.2018.04.30.12.32.42; Mon, 30 Apr 2018 12:32:56 -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; 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 S1756535AbeD3Tbk (ORCPT + 99 others); Mon, 30 Apr 2018 15:31:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:37436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932436AbeD3T3A (ORCPT ); Mon, 30 Apr 2018 15:29:00 -0400 Received: from localhost (unknown [104.132.1.102]) (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 646CD235EC; Mon, 30 Apr 2018 19:29:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 646CD235EC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Todd Kjos Subject: [PATCH 4.16 073/113] ARM: amba: Make driver_override output consistent with other buses Date: Mon, 30 Apr 2018 12:24:44 -0700 Message-Id: <20180430184018.294888857@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184015.043892819@linuxfoundation.org> References: <20180430184015.043892819@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Geert Uytterhoeven commit 5f53624662eaac89598641cee6cd54fc192572d9 upstream. For AMBA devices with unconfigured driver override, the "driver_override" sysfs virtual file is empty, while it contains "(null)" for platform and PCI devices. Make AMBA consistent with other buses by dropping the test for a NULL pointer. Note that contrary to popular belief, sprintf() handles NULL pointers fine; they are printed as "(null)". Signed-off-by: Geert Uytterhoeven Cc: stable Reviewed-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman --- drivers/amba/bus.c | 3 --- 1 file changed, 3 deletions(-) --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -70,9 +70,6 @@ static ssize_t driver_override_show(stru { struct amba_device *dev = to_amba_device(_dev); - if (!dev->driver_override) - return 0; - return sprintf(buf, "%s\n", dev->driver_override); }