diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c index a0d6d90f4cc8..e7281212db5b 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon.c +++ b/drivers/staging/olpc_dcon/olpc_dcon.c @@ -659,8 +659,9 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id) ecreate: for (j = 0; j < i; j++) device_remove_file(&dcon_device->dev, &dcon_device_files[j]); + platform_device_del(dcon_device); edev: - platform_device_unregister(dcon_device); + platform_device_put(dcon_device); dcon_device = NULL; eirq: free_irq(DCON_IRQ, dcon);