Re: [PATCH] RDMA/srp: Fix error handling in srp_add_port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 17, 2024 at 03:55:38PM +0800, Ma Ke wrote:
> The reference count of the device incremented in device_initialize() is
> not decremented when device_add() fails. Add a put_device() call before
> returning from the function to decrement reference count for cleanup.
> Or it could cause memory leak.

That is not what you did here.  Please be more careful when sending out
"bugfixes" like this.

thanks,

greg k-h




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux