Commit 88af89b5 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200407173849.43628-6-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 0874758e
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment