OMAPDSS: panel-sharp-ls037v7dw01: update to use gpiod
Dan Carpenter
dan.carpenter at oracle.com
Wed Dec 23 23:29:26 PST 2015
[ It's weird that I'm just now getting this warning from 2014... Oh
well, looks legit. -dan ]
Hello Tony Lindgren,
The patch 9522f9fe86f9: "OMAPDSS: panel-sharp-ls037v7dw01: update to
use gpiod" from Apr 28, 2014, leads to the following static checker
warning:
drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c:213 sharp_ls_get_gpio()
warn: 'gd' isn't an ERR_PTR
drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
200 static int sharp_ls_get_gpio(struct device *dev, int gpio, unsigned long flags,
201 char *desc, struct gpio_desc **gpiod)
202 {
203 struct gpio_desc *gd;
204 int r;
205
206 *gpiod = NULL;
207
208 r = devm_gpio_request_one(dev, gpio, flags, desc);
209 if (r)
210 return r == -ENOENT ? 0 : r;
211
212 gd = gpio_to_desc(gpio);
213 if (IS_ERR(gd))
214 return PTR_ERR(gd) == -ENOENT ? 0 : PTR_ERR(gd);
^^^^^^^^^^^^^^^^^^^^^^
gd can be an ERR_PTR if gpio_to_desc is defined out but it's never
-ENOENT.
215
216 *gpiod = gd;
217 return 0;
218 }
regards,
dan carpenter
More information about the dri-devel
mailing list