[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190717111136.GB4459@sirena.org.uk>
Date: Wed, 17 Jul 2019 12:11:36 +0100
From: Mark Brown <broonie@...nel.org>
To: Ding Xiang <dingxiang@...s.chinamobile.com>
Cc: linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: remove redundant put_device
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists