On Mon, Sep 07, 2020 at 03:52:16PM +0530, Md Haris Iqbal wrote: > The device .release function was not being set during the device > initialization. This was leading to the below warning, in error cases when > put_srv was called before device_add was called. > > Warning: > > Device '(null)' does not have a release() function, it is broken and must > be fixed. See Documentation/kobject.txt. > > So, set the device .release function during device initialization in the > __alloc_srv() function. > > Fixes: baa5b28b7a47 ("RDMA/rtrs-srv: Replace device_register with device_initialize and device_add") > Signed-off-by: Md Haris Iqbal <haris.iqbal@xxxxxxxxxxxxxxx> > Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx> > Acked-by: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxx> > --- > Change in v2: > Use the complete Fixes line > > drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c | 8 -------- > drivers/infiniband/ulp/rtrs/rtrs-srv.c | 8 ++++++++ > 2 files changed, 8 insertions(+), 8 deletions(-) Applied to for-rc thanks Jason