[patch] gpio: pxa: checking IS_ERR() instead of NULL

2016-01-05 Thread Dan Carpenter
irq_domain_add_legacy() returns NULL on error, it doesn't return error pointers. Fixes: 384ca3c6a28d ('gpio: pxa: change the interrupt management') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index c2d1a47..415852d

[patch] pinctrl: nsp-gpio: forever loop in nsp_gpio_get_strength()

2015-12-23 Thread Dan Carpenter
There is a signedness bug here so the loop will never exit. Fixes: 8bfcbbbcabe0 ('pinctrl: nsp: add gpio-a driver support for Broadcom NSP SoC') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c b/drivers/pinctrl/bcm/pinctrl-nsp-

Re: pinctrl-adi2: Use a signed return type for adi_gpio_irq_startup()

2015-12-19 Thread Dan Carpenter
IRQ pending. > > Change the -EINVAL to 0. > > Is there any more source code clean-up needed around the comment "FIXME" > in the affected function? Delete the FIXME comment. regards, dan carpenter -- To unsubscribe from this list: send the line "unsu

Re: [PATCH] pinctrl-adi2: Use a signed return type for adi_gpio_irq_startup()

2015-12-19 Thread Dan Carpenter
This introduces a compile warning. These functions are supposed to return 1 if there is an IRQ pending. Change the -EINVAL to 0. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majord...@vger.kernel.org More

[patch] gpio: pl061: returning with lock held in pl061_irq_type()

2015-10-08 Thread Dan Carpenter
We were returning with "chip->lock" held by mistake. It's safe to move the return to before we take the spinlock. Fixes: 1dbf7f299f90 ('gpio: pl061: detail IRQ trigger handling') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpio/gpio-pl061.c

[patch] pinctrl: samsung: don't truncate the last char of -grp

2015-06-11 Thread Dan Carpenter
checkpatch.pl these days complains that the allocation failed printks aren't needed so I removed them. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/pinctrl/samsung/pinctrl-exynos5440.c b/drivers/pinctrl/samsung/pinctrl-exynos5440.c index f5619fb..f804a61c 100644

re: gpio: omap: fix error handling in omap_gpio_irq_type

2015-06-09 Thread Dan Carpenter
semicolon regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-gpio in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: pinctrl: add AMD GPIO driver support.

2015-03-20 Thread Dan Carpenter
/ ~/smatch/smatch_scripts/kchecker drivers/pinctrl/pinctrl-amd.c regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-gpio in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

re: pinctrl: add AMD GPIO driver support.

2015-03-19 Thread Dan Carpenter
, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-gpio in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

re: pinctrl: mediatek: emulate GPIO interrupt on both-edges

2015-03-13 Thread Dan Carpenter
); This causes a double free. You can just leave it out since devm_ pointers are freed automatically. 1253 chip_error: 1254 gpiochip_remove(pctl-chip); regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-gpio in the body of a message to majord

[patch] gpio: ge: fix error code in gef_gpio_probe()

2015-01-28 Thread Dan Carpenter
If kstrdup() fails then we should return -ENOMEM but instead the current code returns success. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/gpio/gpio-ge.c b/drivers/gpio/gpio-ge.c index 6ea9303..07e9b39 100644 --- a/drivers/gpio/gpio-ge.c +++ b/drivers/gpio/gpio

[patch] gpio: grgpio: off by one in grgpio_to_irq()

2014-12-16 Thread Dan Carpenter
gc-ngpio is a number between 1 and GRGPIO_MAX_NGPIO. If offset is GRGPIO_MAX_NGPIO then we're going one step beyond the end of the priv-lirqs[] array. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c index 09daaf2

Re: gpio / ACPI: Add support for ACPI GPIO operation regions

2014-03-31 Thread Dan Carpenter
On Mon, Mar 31, 2014 at 03:05:25PM +0300, Mika Westerberg wrote: On Fri, Mar 28, 2014 at 11:37:32AM +0300, Dan Carpenter wrote: Hello Mika Westerberg, The patch 473ed7be0da0: gpio / ACPI: Add support for ACPI GPIO operation regions from Mar 14, 2014, leads to the following static

Re: gpio / ACPI: Add support for ACPI GPIO operation regions

2014-03-31 Thread Dan Carpenter
On Mon, Mar 31, 2014 at 04:45:57PM +0300, Mika Westerberg wrote: On Mon, Mar 31, 2014 at 03:11:33PM +0300, Dan Carpenter wrote: On Mon, Mar 31, 2014 at 03:05:25PM +0300, Mika Westerberg wrote: On Fri, Mar 28, 2014 at 11:37:32AM +0300, Dan Carpenter wrote: Hello Mika Westerberg

[patch] gpio: mvebu: make mvchip-irqbase signed for error handling

2013-11-06 Thread Dan Carpenter
There is a bug in mvebu_gpio_probe() where we do: mvchip-irqbase = irq_alloc_descs(-1, 0, ngpios, -1); if (mvchip-irqbase 0) { The problem is that mvchip-irqbase is unsigned so the error handling doesn't work. I have changed it to be a regular int. Signed-off-by: Dan Carpenter

[patch] gpiolib: unlock on error in gpiod_set_debounce()

2013-09-03 Thread Dan Carpenter
There is a missing unlock on error here. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 0eb9cba..3c01782 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1783,7 +1783,8 @@ static int gpiod_set_debounce