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>
This commit is contained in:
parent
0874758ecb
commit
88af89b52a
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue