against v2.6.30-rc3-next tree.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
__free_page(fw_priv->pages[i]);
kfree(fw_priv->pages);
kfree(fw_priv);
- kfree(dev);
+ put_device(dev);
module_put(THIS_MODULE);
}
retval = device_register(f_dev);
if (retval) {
dev_err(device, "%s: device_register failed\n", __func__);
- goto error_kfree;
+ put_device(f_dev);
+ goto error_kfree1;
}
*dev_p = f_dev;
return 0;
error_kfree:
- kfree(fw_priv);
kfree(f_dev);
+error_kfree1:
+ kfree(fw_priv);
return retval;
}