Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc56ad9b authored by Alan Jenkins's avatar Alan Jenkins Committed by Len Brown
Browse files

eeepc-laptop: fix potential leak (led_init() failure)



If we bail out because we can't create the led class device, we need to
ensure the led workqueue is cleaned up.

Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 2b56f1c1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1248,8 +1248,10 @@ static int eeepc_led_init(struct device *dev)
		return -ENOMEM;

	rv = led_classdev_register(dev, &tpd_led);
	if (rv)
	if (rv) {
		destroy_workqueue(led_workqueue);
		return rv;
	}

	return 0;
}