Skip to content

Commit

Permalink
Staging: ipack: delete the call to remove() in ipack_driver_register
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Samuel Iglesias Gonsalvez authored and Greg Kroah-Hartman committed Jun 7, 2012
1 parent 3b86bb2 commit b2bc13c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/staging/ipack/ipack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b2bc13c

Please sign in to comment.