[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <adedfb49-a66c-4e8c-ac4f-bd137c20ec7a@app.fastmail.com>
Date: Mon, 27 May 2024 18:00:48 +0200
From: "Sven Peter" <sven@...npeter.dev>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
"Hector Martin" <marcan@...can.st>,
"Alyssa Rosenzweig" <alyssa@...enzweig.io>,
"Marcel Holtmann" <marcel@...tmann.org>,
"Luiz Augusto von Dentz" <luiz.dentz@...il.com>, asahi@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-bluetooth@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: stable@...r.kernel.org
Subject: Re: [PATCH 1/1] Bluetooth: hci_bcm4377: Convert PCIBIOS_* return codes to
errnos
Hi,
On Mon, May 27, 2024, at 15:25, Ilpo Järvinen wrote:
> bcm4377_init_cfg() uses pci_{read,write}_config_dword() that return
> PCIBIOS_* codes. The return codes are returned into the calling
> bcm4377_probe() which directly returns the error which is of incorrect
> type (a probe should return normal errnos).
Good catch!
>
> Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal
> errno before returning it from bcm4377_init_cfg. This conversion is the
> easiest by adding a label next to return and doing the conversion there
> once rather than adding pcibios_err_to_errno() into every single return
> statement.
Given that bcm4377_init_cfg is only called at one place from bcm4377_probe
we could also just do something like
ret = bcm4377_init_cfg(bcm4377);
if (ret)
return pcibios_err_to_errno(ret);
there, but either way is fine with me.
Best,
Sven
Powered by blists - more mailing lists