Thread (10 messages) 10 messages, 5 authors, 2023-05-19

Re: [PATCH] media: c8sectpfe: convert to gpio descriptors

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2023-01-30 18:18:01
Also in: linux-media, lkml

On Mon, Jan 30, 2023, at 18:18, Andy Shevchenko wrote:
On Mon, Jan 30, 2023 at 02:09:47PM +0100, Arnd Bergmann wrote:
quoted
+		ret = PTR_ERR_OR_ZERO(tsin->rst_gpio);
 		if (ret && ret != -EBUSY) {
-			dev_err(dev, "Can't request tsin%d reset gpio\n"
-				, fei->channel_data[index]->tsin_id);
+			dev_err_probe(dev, ret,
+				      "reset gpio for tsin%d not valid\n",
+				      tsin->tsin_id);
 			goto err_node_put;
 		}
 
 		if (!ret) {
Can be 

	if (IS_ERR() && PTR_ERR() != -EBUSY) {
		ret = dev_err_probe(dev, PTR_ERR(), ...);
		...
	}

	if (!IS_ERR())

(Up to you)
I prefer the version that only has one PTR_ERR(), but
either way is fine with me.
But -EBUSY check seems strange to me. What was the motivation behind?
(As far as I can read the code the possibility to get this if and only
 if we have requested GPIO too early at initcall level. Would it be
 ever a possibility to get it in real life?)
I noticed this part as being odd as well, no idea why the
code is like this. I just left the logic unchanged here.

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help