diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-04-07 20:38:46 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-04-16 15:21:23 +0300 |
commit | 88af89b52a1b7493f1e5ec165856b4c6767cf654 (patch) | |
tree | e2719a0894855977ba9c5aa992e8d8c8edd05b4c /drivers/pinctrl/pinctrl-mcp23s08.c | |
parent | 0874758ecb2b3faa200a86dda45dbc29335f883e (diff) | |
download | linux-88af89b52a1b7493f1e5ec165856b4c6767cf654.tar.xz |
pinctrl: mcp23s08: Propagate error code from device_property_read_u32()
Return error code from device_property_read_u32() as is in mcp23s08_probe().
While here, drop status variable in mcp23s08_irq_set_type() which always 0.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200407173849.43628-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-mcp23s08.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-mcp23s08.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c index 07b69242a5b3..515d1aa32732 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08.c +++ b/drivers/pinctrl/pinctrl-mcp23s08.c @@ -485,7 +485,6 @@ static int mcp23s08_irq_set_type(struct irq_data *data, unsigned int type) struct gpio_chip *gc = irq_data_get_irq_chip_data(data); struct mcp23s08 *mcp = gpiochip_get_data(gc); unsigned int pos = data->hwirq; - int status = 0; if ((type & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) { mcp_set_bit(mcp, MCP_INTCON, pos, false); @@ -508,7 +507,7 @@ static int mcp23s08_irq_set_type(struct irq_data *data, unsigned int type) } else return -EINVAL; - return status; + return 0; } static void mcp23s08_irq_bus_lock(struct irq_data *data) @@ -964,7 +963,7 @@ static int mcp23s08_probe(struct spi_device *spi) "mcp,spi-present-mask", &spi_present_mask); if (status) { dev_err(&spi->dev, "missing spi-present-mask"); - return -ENODEV; + return status; } } |