--- zzzz-none-000/linux-3.10.107/drivers/gpio/gpio-tps6586x.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/gpio/gpio-tps6586x.c 2021-02-04 17:41:59.000000000 +0000 @@ -97,10 +97,8 @@ pdata = dev_get_platdata(pdev->dev.parent); tps6586x_gpio = devm_kzalloc(&pdev->dev, sizeof(*tps6586x_gpio), GFP_KERNEL); - if (!tps6586x_gpio) { - dev_err(&pdev->dev, "Could not allocate tps6586x_gpio\n"); + if (!tps6586x_gpio) return -ENOMEM; - } tps6586x_gpio->parent = pdev->dev.parent; @@ -108,7 +106,7 @@ tps6586x_gpio->gpio_chip.label = pdev->name; tps6586x_gpio->gpio_chip.dev = &pdev->dev; tps6586x_gpio->gpio_chip.ngpio = 4; - tps6586x_gpio->gpio_chip.can_sleep = 1; + tps6586x_gpio->gpio_chip.can_sleep = true; /* FIXME: add handling of GPIOs as dedicated inputs */ tps6586x_gpio->gpio_chip.direction_output = tps6586x_gpio_output; @@ -139,7 +137,8 @@ { struct tps6586x_gpio *tps6586x_gpio = platform_get_drvdata(pdev); - return gpiochip_remove(&tps6586x_gpio->gpio_chip); + gpiochip_remove(&tps6586x_gpio->gpio_chip); + return 0; } static struct platform_driver tps6586x_gpio_driver = {