summaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2016-02-15 09:24:05 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2016-02-16 17:28:50 +0100
commit17f29d36e4732b91ae299a163d34ed1954500f42 (patch)
treee3e1d2431d80ee41c66f0f4ba4d9652ef3180d8d /arch/arm/common
parentARM: 8522/1: drivers: nvdimm: ensure no negative value gets returned on posit... (diff)
downloadlinux-17f29d36e4732b91ae299a163d34ed1954500f42.tar.xz
linux-17f29d36e4732b91ae299a163d34ed1954500f42.zip
ARM: 8523/1: sa1111: ensure no negative value gets returned on positive match
This patch ensures that existing bus match callbacks don't return negative values (which might be interpreted as potential errors in the future) in case of positive match. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/sa1111.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 3d224941b541..fb0a0a4dfea4 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -1290,7 +1290,7 @@ static int sa1111_match(struct device *_dev, struct device_driver *_drv)
struct sa1111_dev *dev = SA1111_DEV(_dev);
struct sa1111_driver *drv = SA1111_DRV(_drv);
- return dev->devid & drv->devid;
+ return !!(dev->devid & drv->devid);
}
static int sa1111_bus_suspend(struct device *dev, pm_message_t state)