linux/drivers/infiniband/ulp
Bart Van Assche c8e4c23976 RDMA/srp: Rework the srp_add_port() error path
device_register() always calls device_initialize() so calling device_del()
is safe even if device_register() fails. Implement the following advice
from the comment block above device_register(): "NOTE: _Never_ directly free
@dev after calling this function, even if it returned an error! Always use
put_device() to give up the reference initialized in this function instead."
Keep the kfree() call in the error path since srp_release_dev() does not
free the host.

Link: https://lore.kernel.org/r/20220825213900.864587-2-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2022-08-28 13:02:04 +03:00
..
ipoib IB: move from strlcpy with unused retval to strscpy 2022-08-21 14:18:02 +03:00
iser v5.20 pull request 2022-08-04 19:54:32 -07:00
isert v5.19 pull request 2022-05-26 21:08:40 -07:00
opa_vnic IB: move from strlcpy with unused retval to strscpy 2022-08-21 14:18:02 +03:00
rtrs RDMA/rtrs-clt: Output sg index when warning on 2022-08-21 12:25:46 +03:00
srp RDMA/srp: Rework the srp_add_port() error path 2022-08-28 13:02:04 +03:00
srpt IB: move from strlcpy with unused retval to strscpy 2022-08-21 14:18:02 +03:00
Makefile RDMA/rtrs: include client and server modules into kernel compilation 2020-05-17 18:57:15 -03:00