summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2018-04-10 15:21:43 +0200
committerSasha Levin <alexander.levin@microsoft.com>2018-05-22 21:36:39 -0400
commitf854c3b36d3f4a3917bee5caa2bb5d7afe839e1d (patch)
tree47fdf0317b9f489fa59dcb92d30de5a9ef010a00
parentf4a8b0968306951e1e73bc813a90ee88a01bfd22 (diff)
downloadlinux-stable-f854c3b36d3f4a3917bee5caa2bb5d7afe839e1d.tar.gz
ARM: amba: Make driver_override output consistent with other buses
[ Upstream commit 5f53624662eaac89598641cee6cd54fc192572d9 ] 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 <geert+renesas@glider.be> Cc: stable <stable@vger.kernel.org> Reviewed-by: Todd Kjos <tkjos@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-rw-r--r--drivers/amba/bus.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index f0099360039e..8bf4d39b082b 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -69,9 +69,6 @@ static ssize_t driver_override_show(struct device *_dev,
{
struct amba_device *dev = to_amba_device(_dev);
- if (!dev->driver_override)
- return 0;
-
return sprintf(buf, "%s\n", dev->driver_override);
}