From: Dan Williams Date: Mon, 15 Feb 2016 08:22:36 +0000 (+0100) Subject: ARM: 8522/1: drivers: nvdimm: ensure no negative value gets returned on positive... X-Git-Tag: v4.14-rc1~3605^2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82ec2ba2b18109e134f0d4ace69b0c9c253b6d17;p=platform%2Fkernel%2Flinux-rpi.git ARM: 8522/1: drivers: nvdimm: 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: Dan Williams Signed-off-by: Marek Szyprowski Signed-off-by: Russell King --- diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 7e2c43f..2b2181c 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -62,7 +62,7 @@ static int nvdimm_bus_match(struct device *dev, struct device_driver *drv) { struct nd_device_driver *nd_drv = to_nd_device_driver(drv); - return test_bit(to_nd_device_type(dev), &nd_drv->type); + return !!test_bit(to_nd_device_type(dev), &nd_drv->type); } static struct module *to_bus_provider(struct device *dev)