Received: by 10.192.165.148 with SMTP id m20csp4180588imm; Mon, 30 Apr 2018 13:19:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqetDaZSyylIyN0UPc+H5lmf4hjZbk1NK1UjBoKM8Yyl/gDIQXrX6QPfHxqKIDe83t0QATG X-Received: by 10.98.72.209 with SMTP id q78mr13310406pfi.70.1525119560885; Mon, 30 Apr 2018 13:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525119560; cv=none; d=google.com; s=arc-20160816; b=EX/KNO7SZeYR7BEMP2kMkl6PFoCWupvTPME/i5vORVV0+/UNRPs9Uo/mEpECNvoqDJ ynmSmxrsUokalJikFVItss10ya2lSNQ9N2boYgmPURI9pYWTWslLDHitDVXEZwmoHPJg qIUoMMjDNKM1mO9lYknb1MgsoyCUDjV2qV7FQ7F1nnSR5q0fvAnkW1qxatHihS0QQaYx oDBzJTFdFBduo51gEKGcvxy11Q6yUQE3fr5XOlvfJrggpRUWklJU9SzSnxSpeq2DdxUA cocxk7EpebrPhxLdIORMYkLp+CBW9zkNDqTtUpt3vDDNP0u3iF3K7Gy0VktHXhMAecco Mo+w== 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=QpiyMt1ebROpmBD0KrUNmUWdm7XmAoK0vdJRp9/nGg4=; b=WlWrHJCgT6m26/mVGmEKNBTZDWZE1oRv0YNd+bs4bym62/bJfiodxG4rc8q1yyAX2p 0BkD6mQd0NktES/tnrqgfojh6GXWTPjldbv4UP/LcHu7BAtMiFu9Eo0xjeRmk4VMq1SG Iom1nypDbbvWHCtp3GfGTlHwRlwRtih4FvO2Iir6yDNIow8STCyLrPd1YHBPFsy8T/GC vMtF2KRuRHIS7bqbeIlj6QvYLkysH/RGyS5eza7F3hD87VnFHwTrJl7JFCDoTdrFuiop FooOcvE8HO2udxcw/stMqWtJ9sFzhjH71hqQ2wE+lC6njEP8+eYomTNW2+nrLKxd44SY TBOg== 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 z5si7741965pfh.110.2018.04.30.13.19.06; Mon, 30 Apr 2018 13:19:20 -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 S1755838AbeD3T04 (ORCPT + 99 others); Mon, 30 Apr 2018 15:26:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:60982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755797AbeD3T0v (ORCPT ); Mon, 30 Apr 2018 15:26:51 -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 9A71122E02; Mon, 30 Apr 2018 19:26:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A71122E02 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.9 44/61] ARM: amba: Make driver_override output consistent with other buses Date: Mon, 30 Apr 2018 12:24:47 -0700 Message-Id: <20180430183955.093881754@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430183951.312721450@linuxfoundation.org> References: <20180430183951.312721450@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.9-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); }