Skip to content

Commit cf2b191

Browse files
committed
Merge tag 'driver-core-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core fixes from Greg KH: "Here are two driver core fixes for 4.9-rc5. The first resolves an issue with some drivers not liking to be unbound and bound again (if CONFIG_DEBUG_TEST_DRIVER_REMOVE is enabled), which solves some reported problems with graphics and storage drivers. The other resolves a smatch error with the 4.9-rc1 driver core changes around this feature. Both have been in linux-next with no reported issues" * tag 'driver-core-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: fix smatch warning on dev->bus check driver core: skip removal test for non-removable drivers
2 parents 85b9df7 + bdacd1b commit cf2b191

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/base/dd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
324324
{
325325
int ret = -EPROBE_DEFER;
326326
int local_trigger_count = atomic_read(&deferred_trigger_count);
327-
bool test_remove = IS_ENABLED(CONFIG_DEBUG_TEST_DRIVER_REMOVE);
327+
bool test_remove = IS_ENABLED(CONFIG_DEBUG_TEST_DRIVER_REMOVE) &&
328+
!drv->suppress_bind_attrs;
328329

329330
if (defer_all_probes) {
330331
/*
@@ -383,7 +384,7 @@ static int really_probe(struct device *dev, struct device_driver *drv)
383384
if (test_remove) {
384385
test_remove = false;
385386

386-
if (dev->bus && dev->bus->remove)
387+
if (dev->bus->remove)
387388
dev->bus->remove(dev);
388389
else if (drv->remove)
389390
drv->remove(dev);

0 commit comments

Comments
 (0)