mirror of https://gitee.com/openkylin/linux.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 <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>
This commit is contained in:
parent
92e963f50f
commit
82ec2ba2b1
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue