]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: 8523/1: sa1111: ensure no negative value gets returned on positive match
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 15 Feb 2016 08:24:05 +0000 (09:24 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 16 Feb 2016 16:28:50 +0000 (16:28 +0000)
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>
arch/arm/common/sa1111.c

index 3d224941b5419e88a25aae2ae70632dba047606c..fb0a0a4dfea4da26fd635ccbad4a06de0a72ce94 100644 (file)
@@ -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)