[PATCH 2/5] Staging: ipack: delete the call to remove() in ipack_driver_register

From: Samuel Iglesias Gonsalvez
Date: Fri May 25 2012 - 04:07:37 EST


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@xxxxxxxxxx>
---
drivers/staging/ipack/ipack.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/staging/ipack/ipack.c b/drivers/staging/ipack/ipack.c
index e97be99..a1448e6 100644
--- a/drivers/staging/ipack/ipack.c
+++ b/drivers/staging/ipack/ipack.c
@@ -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;
}
--
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/