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

Configure Feed

Select the types of activity you want to include in your feed.

component: do not try to unbind unbound components

Error handling is apparently hard and driver authors often get it wrong.

Continue to warn but do not try to unbind components that have never
been bound in order to avoid crashing systems where such a buggy
teardown path is hit.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20250228081824.4640-1-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
5bcca368 eaa0d302

+2 -1
+2 -1
drivers/base/component.c
··· 586 586 static void component_unbind(struct component *component, 587 587 struct aggregate_device *adev, void *data) 588 588 { 589 - WARN_ON(!component->bound); 589 + if (WARN_ON(!component->bound)) 590 + return; 590 591 591 592 dev_dbg(adev->parent, "unbinding %s component %p (ops %ps)\n", 592 593 dev_name(component->dev), component, component->ops);