Yang Yingliang 402ab979b2 pcmcia: ds: fix refcount leak in pcmcia_device_add()
As the comment of device_register() says, it should use put_device()
to give up the reference in the error path. Then, insofar resources
will be freed in pcmcia_release_dev(), the error path is no longer
needed. In particular, this means that the (previously missing) dropping
of the reference to &p_dev->function_config->ref is now handled by
pcmcia_release_dev().

Fixes: 360b65b95bae ("[PATCH] pcmcia: make config_t independent, add reference counting")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
[linux@dominikbrodowski.net: simplification, commit message rewrite]
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2023-09-03 10:14:48 +02:00
..
2023-05-31 19:17:40 +01:00
2018-12-04 22:37:38 +00:00
2018-12-04 22:37:38 +00:00