Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Williams and committed by
Russell King
82ec2ba2 92e963f5

+1 -1
+1 -1
drivers/nvdimm/bus.c
··· 62 62 { 63 63 struct nd_device_driver *nd_drv = to_nd_device_driver(drv); 64 64 65 - return test_bit(to_nd_device_type(dev), &nd_drv->type); 65 + return !!test_bit(to_nd_device_type(dev), &nd_drv->type); 66 66 } 67 67 68 68 static struct module *to_bus_provider(struct device *dev)