linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Yang Yingliang <yangyingliang@huawei.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-xtensa@linux-xtensa.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH v1] spi: xtensa-xtfpga: Fix a double put() in xtfpga_spi_remove()
Date: Mon, 12 Dec 2022 15:36:51 +0000	[thread overview]
Message-ID: <Y5dKk+uw3UcW2Pu1@sirena.org.uk> (raw)
In-Reply-To: <CAMo8BfKCv9j-ftKWU+B27g1oHBB_=EZhGBH7qymyVAeF10JcnQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

On Sat, Dec 10, 2022 at 06:48:02AM -0800, Max Filippov wrote:
> Hi Christophe,
> 
> On Sat, Dec 10, 2022 at 3:52 AM Christophe JAILLET
> <christophe.jaillet@wanadoo.fr> wrote:

> > 'master' is allocated with devm_spi_alloc_master(), there is no need to
> > put it explicitly in the remove function.

> >         spi_bitbang_stop(&xspi->bitbang);
> > -       spi_master_put(master);

> This put is matching the get in the spi_bitbang_start.
> It was discussed here:
> https://lore.kernel.org/linux-spi/CAMo8BfJaD7pG_iutY8jordysjChyzhTpVSqpxXh3QoZsj2QmaQ@mail.gmail.com/

Probably worth a comment though since it is a bit of a gotcha.  Ideally
we'd improve this in the bitbang code but that's harder.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-12-12 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-10 11:52 [PATCH v1] spi: xtensa-xtfpga: Fix a double put() in xtfpga_spi_remove() Christophe JAILLET
2022-12-10 14:48 ` Max Filippov
2022-12-12 15:36   ` Mark Brown [this message]
2022-12-13  1:30     ` Yang Yingliang
2022-12-13 11:40       ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y5dKk+uw3UcW2Pu1@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=jcmvbkbc@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).