summaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1/w1.c')
-rw-r--r--drivers/w1/w1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index bbef470ba7..ff573860ea 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -392,7 +392,8 @@ static void w1_bus_remove(struct device_d *_dev)
struct w1_driver *drv = to_w1_driver(_dev->driver);
struct w1_device *dev = to_w1_device(_dev);
- return drv->remove(dev);
+ if (drv->remove)
+ drv->remove(dev);
}
struct bus_type w1_bustype= {