Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1331056
| From | Marek Szyprowski <m.szyprowski@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v5 RESEND 1/5] drivers: nvdimm: ensure no negative value gets returned on positive match |
| Date | 2016-02-10 11:50 +0100 |
| Message-ID | <r0Avn-12b-11@gated-at.bofh.it> (permalink) |
| References | <r0Avn-12b-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Dan Williams <dan.j.williams@intel.com>
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>
---
drivers/nvdimm/bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
1.9.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v5 RESEND 0/5] AMBA: add complete support for power domains Marek Szyprowski <m.szyprowski@samsung.com> - 2016-02-10 11:50 +0100
[PATCH v5 RESEND 1/5] drivers: nvdimm: ensure no negative value gets returned on positive match Marek Szyprowski <m.szyprowski@samsung.com> - 2016-02-10 11:50 +0100
[PATCH v5 RESEND 3/5] driver core: handle -EPROBE_DEFER from bus_type.match() Marek Szyprowski <m.szyprowski@samsung.com> - 2016-02-10 11:50 +0100
Re: [PATCH v5 RESEND 3/5] driver core: handle -EPROBE_DEFER from bus_type.match() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-12 04:20 +0100
[PATCH v5 RESEND 5/5] ARM: amba: Properly handle devices with power domains Marek Szyprowski <m.szyprowski@samsung.com> - 2016-02-10 11:50 +0100
[PATCH v5 RESEND 2/5] ARM: sa1111: ensure no negative value gets returned on positive match Marek Szyprowski <m.szyprowski@samsung.com> - 2016-02-10 11:50 +0100
Re: [PATCH v5 RESEND 2/5] ARM: sa1111: ensure no negative value gets returned on positive match Ulf Hansson <ulf.hansson@linaro.org> - 2016-02-10 17:50 +0100
csiph-web