Re: [PATCH] spi: remove redundant put_device

From: Mark Brown
Date: Wed Jul 17 2019 - 07:11:43 EST


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