All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christian Gromm <christian.gromm@microchip.com>
Cc: gregkh@linuxfoundation.org, driverdev-devel@linuxdriverproject.org
Subject: Re: [PATCH v2 04/14] staging: most: sound: introduce new sound adapter management
Date: Thu, 28 Mar 2019 16:56:44 +0300	[thread overview]
Message-ID: <20190328135644.GJ32590@kadam> (raw)
In-Reply-To: <1553779062-10435-5-git-send-email-christian.gromm@microchip.com>

On Thu, Mar 28, 2019 at 02:17:32PM +0100, Christian Gromm wrote:
> +static int audio_create_sound_card(void)
> +{
> +	int ret;
> +	struct sound_adapter *adpt;
> +
> +	list_for_each_entry(adpt, &adpt_list, list) {
> +		if (!adpt->registered)
> +			goto adpt_alloc;
> +	}
> +	return -ENODEV;
> +adpt_alloc:
> +	ret = snd_card_register(adpt->card);
> +	if (ret < 0) {
> +		release_adapter(adpt);

This doesn't feel right.  We didn't acquire "adpt" in this function so
why are we releasing it here.  Do we release it somewhere else as well?

It's still on the list...

> +		return ret;
> +	}
> +	adpt->registered = true;
> +	return ret;
> +}

regards,
dan carpenter


_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2019-03-28 13:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 13:17 [PATCH v2 00/14] staging: most: switch to configfs Christian Gromm
2019-03-28 13:17 ` [PATCH v2 01/14] staging: most: add new file configfs.c Christian Gromm
2019-03-28 13:50   ` Dan Carpenter
2019-03-29  9:20     ` Christian.Gromm
2019-03-28 13:17 ` [PATCH v2 02/14] staging: most: change signature of function probe_channel Christian Gromm
2019-03-28 13:17 ` [PATCH v2 03/14] staging: most: core: add configfs interface functions Christian Gromm
2019-03-28 13:53   ` Dan Carpenter
2019-03-28 13:17 ` [PATCH v2 04/14] staging: most: sound: introduce new sound adapter management Christian Gromm
2019-03-28 13:56   ` Dan Carpenter [this message]
2019-03-29  9:35     ` Christian.Gromm
2019-03-29 10:46   ` Dan Carpenter
2019-03-29 12:59     ` Christian.Gromm
2019-03-29 13:50       ` Dan Carpenter
2019-03-29 15:04         ` Christian.Gromm
2019-03-28 13:17 ` [PATCH v2 05/14] staging: most: enable configfs support Christian Gromm
2019-03-28 13:17 ` [PATCH v2 06/14] staging: most: core: make sysfs attributes read-only Christian Gromm
2019-03-28 13:17 ` [PATCH v2 07/14] staging: most: core: use device description as name Christian Gromm
2019-03-28 13:17 ` [PATCH v2 08/14] staging: most: usb: remove prefix from description tag Christian Gromm
2019-03-28 13:17 ` [PATCH v2 09/14] staging: most: core: remove attribute add_link Christian Gromm
2019-03-28 13:17 ` [PATCH v2 10/14] staging: most: allow speculative configuration Christian Gromm
2019-03-28 14:12   ` Dan Carpenter
2019-03-29  9:15     ` Christian.Gromm
2019-03-29  9:32       ` Dan Carpenter
2019-03-28 13:17 ` [PATCH v2 11/14] staging: most: configfs: make create attributes write-only Christian Gromm
2019-03-28 13:17 ` [PATCH v2 12/14] staging: most: configfs: add code for link removal Christian Gromm
2019-03-28 13:17 ` [PATCH v2 13/14] staging: most: configfs: rename config attributes Christian Gromm
2019-03-28 13:17 ` [PATCH v2 14/14] staging: most: Documentation: update driver documentation Christian Gromm

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=20190328135644.GJ32590@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=christian.gromm@microchip.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.