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

Commit b2bc13c5 authored by Samuel Iglesias Gonsalvez's avatar Samuel Iglesias Gonsalvez Committed by Greg Kroah-Hartman
Browse files

Staging: ipack: delete the call to remove() in ipack_driver_register



When a bus driver calls ipack_driver_register(), it should manages the returning
NULL value to undo all the operations it did before this call, and print the
corresponding trace.

It is not a task for the ipack driver to call the remove() function here.

Signed-off-by: default avatarSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3b86bb2e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -141,8 +141,6 @@ struct ipack_device *ipack_device_register(struct ipack_bus_device *bus,

	ret = device_register(&dev->dev);
	if (ret < 0) {
		pr_err("error registering the device.\n");
		dev->driver->ops->remove(dev);
		kfree(dev);
		return NULL;
	}