Re: [PATCH] spi: remove redundant put_device

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

 



On Wed, Jul 17, 2019 at 06:05:44PM +0800, Ding Xiang wrote:

> device_unregister will call put_device,
> so remove the redundant put_device

>  	child = device_find_child(&ctlr->dev, NULL, match_true);
> -	if (child) {
> +	if (child)
>  		/* Remove registered slave */
>  		device_unregister(child);
> -		put_device(child);
> -	}

That's to undo the extra get we have from device_find_child(),
not to undo part of the registration.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux