Received: by 10.192.165.148 with SMTP id m20csp4160317imm; Mon, 30 Apr 2018 12:56:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZphcVOVyvNnUUjP3BEL2PRkuWCdAUo5yATHkLwivdUiX9oZImLiqK6dAPUsagDO2+YGVVYg X-Received: by 2002:a17:902:6786:: with SMTP id g6-v6mr13473813plk.362.1525118175102; Mon, 30 Apr 2018 12:56:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525118175; cv=none; d=google.com; s=arc-20160816; b=M3vDaBYmnOW2vp8QfpC95gsdxlEll6zycCoMpNjqGmdiaq7NTDBCkQVVHPiC21R1rm +CP8apJdkhGW6TdXCjHrLJF9PxVJ60qP85Zdl/kpLSUjXJE9aMhgBjYu/cyej3i9omFK caTdiWm18A7w1203/d0DW1qxglqZOVG8wnN9tLsUCtPMLnFZgRlh9/Ue1JLh6CWeifu2 1HAx74s8Y5yh9eG4+7rHnIglteL/ZWD2mS/nMWLoS2j8GMayqmYCX83RBAYSnNK9gjFP a4pPxQR3NAlcwWs+Qk3vDJAFLBegUd3XyHay0ZKV+YlQJ7JA9wYcTlG6TwYTYOAmzpMP U3+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=zeFyEbiJzp5mcQzsGCGVDe5RpVHrq6PS7+a549i5H7I=; b=QNp8w7KG6soMVyuKz/RSQfhxGSomNzxL6ZSHhwA7HSxQYSRrNBVuTRJTeGoMubT/kd 2dLgg7vKbHkgZUiOQ1Mwk2pH//bE4t2M0neoJc7ME27BVElwnqF/je1mt45SxdcLXB+2 X47fo/qjL4QY9AabB7ZRuBEB20s1uGh8fcgSNZM1b+yDet+/0KFT8Bwpdl+GlqLhI9TC zEq+nH/IcViuUGnP5g4ACdDoFYryp8X8cRDyAtCi9LlgW5Nw65Z4fFr/xIh8FPS1hhZ8 tvRI98FAaII8MfsaQMWvtH7rCWekqLdV5YqK6+7CVbHhpjGvVlyWeOeVOyPmmtr9I8RL HVPA== 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 v2-v6si6543381pgf.75.2018.04.30.12.56.00; Mon, 30 Apr 2018 12:56:15 -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 S1756214AbeD3Tzw (ORCPT + 99 others); Mon, 30 Apr 2018 15:55:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:34934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756084AbeD3T1w (ORCPT ); Mon, 30 Apr 2018 15:27:52 -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 A510622DBF; Mon, 30 Apr 2018 19:27:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A510622DBF 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.14 64/91] ARM: amba: Make driver_override output consistent with other buses Date: Mon, 30 Apr 2018 12:24:46 -0700 Message-Id: <20180430184007.499428338@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184004.216234025@linuxfoundation.org> References: <20180430184004.216234025@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.14-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); }