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: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ret = device_register(&dev->dev);
if (ret < 0) {
- pr_err("error registering the device.\n");
- dev->driver->ops->remove(dev);
kfree(dev);
return NULL;
}