Skip to content

Commit 82ec2ba

Browse files
djbwRussell King
authored andcommitted
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 <dan.j.williams@intel.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 92e963f commit 82ec2ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvdimm/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static int nvdimm_bus_match(struct device *dev, struct device_driver *drv)
6262
{
6363
struct nd_device_driver *nd_drv = to_nd_device_driver(drv);
6464

65-
return test_bit(to_nd_device_type(dev), &nd_drv->type);
65+
return !!test_bit(to_nd_device_type(dev), &nd_drv->type);
6666
}
6767

6868
static struct module *to_bus_provider(struct device *dev)

0 commit comments

Comments
 (0)