Re: [RFC PATCH] ALSA: pci: add PreSonus Quantum PCI driver

Markus Elfring <[email protected]>
Newsgroups org.kernel.vger.linux-sound,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
…
> +++ b/sound/pci/quantum/quantum_dma.c
> @@ -0,0 +1,853 @@
…
> +static int snd_quantum_create(struct snd_card *card, struct pci_dev *pci,
> +			      const struct quantum_device_entry *model)
> +{
…
> +	chip->cmd_wq = alloc_workqueue("quantum-cmd",
> +				       WQ_UNBOUND | WQ_MEM_RECLAIM,
> +				       1);
> +
> +	if (!chip->cmd_wq) {

I suggest to omit a blank line at this place.


> +		dev_err(&pci->dev, "failed to create command workqueue\n");
> +		err = -ENOMEM;
> +		goto err_wq;
> +	}
…

Please return directly in this if branch.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.2#n532


…
> +err_wq:
> +	if (chip->cmd_wq)
…

Can this pointer check be omitted here?

Regards,
Markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.