Received: by 10.192.165.148 with SMTP id m20csp4193808imm; Mon, 30 Apr 2018 13:35:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrMDT1bde1LQHP8sJ7S3heRMOJ2Dwr2Gw58D9q3RgtAaubbxKGAMYxYJcYjHD7LiU7BTfng X-Received: by 2002:a17:902:481:: with SMTP id e1-v6mr13862689ple.377.1525120529453; Mon, 30 Apr 2018 13:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525120529; cv=none; d=google.com; s=arc-20160816; b=vndCLsChRc4g5d/8i139NYZsJx4Qg/eqrBrOmJA19DNrQBX8Zx6iWXJyRCcpKTHvpG hG5cwIb/ggdQMe1N7LiJBK1Cy8euWsk0EpjoOMJvRGaArMm2pM3o7gjzSNXcvpdX+Z8E ryZidvLTeLGMuRO+m+tAhG7CizAxeDfW9Lt458eL48q2Rc85SS06IwP5ktgPVm0AfktR OPN4x369bSURMjQ3ehwje5rf4beVhuOfNdtwJrwJ3bHErwChwHOjZkGQkX8tMpFpQvAv bVJmfqBgAtMvD+T6qMrsbD5qpw0HAwn8HRj/udeQeH6nEhjkVmrZ4f0hFAjtQtqVxuMp HGvg== 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=BHlguaX30GCCmKyyp9sQSadzRVkLxBq94P6+lBLVpS8=; b=QvWG1O50TyV/I9wsdyhwnhRtczSTV/MjutMfLJuewYJ9tT4dU+IurBCJMBhbvFiRMv 3rGOD1YVQQxC5eEk9DK6Dn/apy5KA/RtITFo2WEA7w8ROdA8vsUopw7y4GJl5hdmv898 rW9KDVuLfYzF03LyaZphRq4wqugqFmsqbUsbyh/OOOSVhaGou7GFssXE+Y+tTnqkNnbu M6j854EIu+QwFONoYPjK2cKROWRZL2UeWYsUXh2dnx0aR+/l6IkGb2mX2+QIo1kyv7Ic dRVewMAT1pMsT8LUrJGgrnzbtx4tfUzj0IqGRzj/aJhdsIoXkEO50xLYRJ5NKj9PwUix Wi4w== 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 v32-v6si7953539plb.575.2018.04.30.13.34.45; Mon, 30 Apr 2018 13:35: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; 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 S1755563AbeD3UeO (ORCPT + 99 others); Mon, 30 Apr 2018 16:34:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:59164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755487AbeD3T0B (ORCPT ); Mon, 30 Apr 2018 15:26:01 -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 3174622DC0; Mon, 30 Apr 2018 19:26:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3174622DC0 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.4 35/44] ARM: amba: Make driver_override output consistent with other buses Date: Mon, 30 Apr 2018 12:24:46 -0700 Message-Id: <20180430190947.731985448@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430190946.093694747@linuxfoundation.org> References: <20180430190946.093694747@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.4-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 @@ -69,9 +69,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); }