From: Geert Uytterhoeven Date: Tue, 10 Apr 2018 13:21:43 +0000 (+0200) Subject: ARM: amba: Make driver_override output consistent with other buses X-Git-Tag: v4.1.52~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f854c3b36d3f4a3917bee5caa2bb5d7afe839e1d;p=thirdparty%2Fkernel%2Fstable.git 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 Cc: stable Reviewed-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index f0099360039e2..8bf4d39b082b9 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); }