Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: remove all usage of gpio_remove retval in driver/gpio

Signed-off-by: abdoulaye berthe <berthe.ab@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

abdoulaye berthe and committed by
Linus Walleij
9f5132ae 38ed0187

+100 -242
+3 -5
drivers/gpio/gpio-74x164.c
··· 167 167 static int gen_74x164_remove(struct spi_device *spi) 168 168 { 169 169 struct gen_74x164_chip *chip = spi_get_drvdata(spi); 170 - int ret; 171 170 172 - ret = gpiochip_remove(&chip->gpio_chip); 173 - if (!ret) 174 - mutex_destroy(&chip->lock); 171 + gpiochip_remove(&chip->gpio_chip); 172 + mutex_destroy(&chip->lock); 175 173 176 - return ret; 174 + return 0; 177 175 } 178 176 179 177 static const struct of_device_id gen_74x164_dt_ids[] = {
+1 -8
drivers/gpio/gpio-adnp.c
··· 585 585 { 586 586 struct adnp *adnp = i2c_get_clientdata(client); 587 587 struct device_node *np = client->dev.of_node; 588 - int err; 589 588 590 - err = gpiochip_remove(&adnp->gpio); 591 - if (err < 0) { 592 - dev_err(&client->dev, "%s failed: %d\n", "gpiochip_remove()", 593 - err); 594 - return err; 595 - } 596 - 589 + gpiochip_remove(&adnp->gpio); 597 590 if (of_find_property(np, "interrupt-controller", NULL)) 598 591 adnp_irq_teardown(adnp); 599 592
+1 -7
drivers/gpio/gpio-adp5520.c
··· 167 167 static int adp5520_gpio_remove(struct platform_device *pdev) 168 168 { 169 169 struct adp5520_gpio *dev; 170 - int ret; 171 170 172 171 dev = platform_get_drvdata(pdev); 173 - ret = gpiochip_remove(&dev->gpio_chip); 174 - if (ret) { 175 - dev_err(&pdev->dev, "%s failed, %d\n", 176 - "gpiochip_remove()", ret); 177 - return ret; 178 - } 172 + gpiochip_remove(&dev->gpio_chip); 179 173 180 174 return 0; 181 175 }
+1 -5
drivers/gpio/gpio-adp5588.c
··· 470 470 if (dev->irq_base) 471 471 free_irq(dev->client->irq, dev); 472 472 473 - ret = gpiochip_remove(&dev->gpio_chip); 474 - if (ret) { 475 - dev_err(&client->dev, "gpiochip_remove failed %d\n", ret); 476 - return ret; 477 - } 473 + gpiochip_remove(&dev->gpio_chip); 478 474 479 475 kfree(dev); 480 476 return 0;
+1 -2
drivers/gpio/gpio-amd8111.c
··· 232 232 233 233 static void __exit amd_gpio_exit(void) 234 234 { 235 - int err = gpiochip_remove(&gp.chip); 236 - WARN_ON(err); 235 + gpiochip_remove(&gp.chip); 237 236 ioport_unmap(gp.pm); 238 237 release_region(gp.pmbase + PMBASE_OFFSET, PMBASE_SIZE); 239 238 }
+2 -1
drivers/gpio/gpio-arizona.c
··· 149 149 { 150 150 struct arizona_gpio *arizona_gpio = platform_get_drvdata(pdev); 151 151 152 - return gpiochip_remove(&arizona_gpio->gpio_chip); 152 + gpiochip_remove(&arizona_gpio->gpio_chip); 153 + return 0; 153 154 } 154 155 155 156 static struct platform_driver arizona_gpio_driver = {
+1 -7
drivers/gpio/gpio-cs5535.c
··· 358 358 static int cs5535_gpio_remove(struct platform_device *pdev) 359 359 { 360 360 struct resource *r; 361 - int err; 362 361 363 - err = gpiochip_remove(&cs5535_gpio_chip.chip); 364 - if (err) { 365 - /* uhh? */ 366 - dev_err(&pdev->dev, "unable to remove gpio_chip?\n"); 367 - return err; 368 - } 362 + gpiochip_remove(&cs5535_gpio_chip.chip); 369 363 370 364 r = platform_get_resource(pdev, IORESOURCE_IO, 0); 371 365 release_region(r->start, resource_size(r));
+2 -1
drivers/gpio/gpio-da9052.c
··· 237 237 { 238 238 struct da9052_gpio *gpio = platform_get_drvdata(pdev); 239 239 240 - return gpiochip_remove(&gpio->gp); 240 + gpiochip_remove(&gpio->gp); 241 + return 0; 241 242 } 242 243 243 244 static struct platform_driver da9052_gpio_driver = {
+2 -1
drivers/gpio/gpio-da9055.c
··· 174 174 { 175 175 struct da9055_gpio *gpio = platform_get_drvdata(pdev); 176 176 177 - return gpiochip_remove(&gpio->gp); 177 + gpiochip_remove(&gpio->gp); 178 + return 0; 178 179 } 179 180 180 181 static struct platform_driver da9055_gpio_driver = {
+1 -1
drivers/gpio/gpio-dwapb.c
··· 359 359 360 360 for (m = 0; m < gpio->nr_ports; ++m) 361 361 if (gpio->ports[m].is_registered) 362 - WARN_ON(gpiochip_remove(&gpio->ports[m].bgc.gc)); 362 + gpiochip_remove(&gpio->ports[m].bgc.gc); 363 363 } 364 364 365 365 static int dwapb_gpio_probe(struct platform_device *pdev)
+1 -4
drivers/gpio/gpio-em.c
··· 409 409 static int em_gio_remove(struct platform_device *pdev) 410 410 { 411 411 struct em_gio_priv *p = platform_get_drvdata(pdev); 412 - int ret; 413 412 414 - ret = gpiochip_remove(&p->gpio_chip); 415 - if (ret) 416 - return ret; 413 + gpiochip_remove(&p->gpio_chip); 417 414 418 415 irq_domain_remove(p->irq_domain); 419 416 return 0;
+2 -16
drivers/gpio/gpio-f7188x.c
··· 317 317 err_gpiochip: 318 318 for (i = i - 1; i >= 0; i--) { 319 319 struct f7188x_gpio_bank *bank = &data->bank[i]; 320 - int tmp; 321 - 322 - tmp = gpiochip_remove(&bank->chip); 323 - if (tmp < 0) 324 - dev_err(&pdev->dev, 325 - "Failed to remove gpiochip %d: %d\n", 326 - i, tmp); 320 + gpiochip_remove(&bank->chip); 327 321 } 328 322 329 323 return err; ··· 325 331 326 332 static int f7188x_gpio_remove(struct platform_device *pdev) 327 333 { 328 - int err; 329 334 int i; 330 335 struct f7188x_gpio_data *data = platform_get_drvdata(pdev); 331 336 332 337 for (i = 0; i < data->nr_bank; i++) { 333 338 struct f7188x_gpio_bank *bank = &data->bank[i]; 334 - 335 - err = gpiochip_remove(&bank->chip); 336 - if (err) { 337 - dev_err(&pdev->dev, 338 - "Failed to remove GPIO gpiochip %d: %d\n", 339 - i, err); 340 - return err; 341 - } 339 + gpiochip_remove(&bank->chip); 342 340 } 343 341 344 342 return 0;
+2 -1
drivers/gpio/gpio-generic.c
··· 398 398 399 399 int bgpio_remove(struct bgpio_chip *bgc) 400 400 { 401 - return gpiochip_remove(&bgc->gc); 401 + gpiochip_remove(&bgc->gc); 402 + return 0; 402 403 } 403 404 EXPORT_SYMBOL_GPL(bgpio_remove); 404 405
+1 -3
drivers/gpio/gpio-grgpio.c
··· 468 468 } 469 469 } 470 470 471 - ret = gpiochip_remove(&priv->bgc.gc); 472 - if (ret) 473 - goto out; 471 + gpiochip_remove(&priv->bgc.gc); 474 472 475 473 if (priv->domain) 476 474 irq_domain_remove(priv->domain);
+1 -8
drivers/gpio/gpio-ich.c
··· 514 514 515 515 static int ichx_gpio_remove(struct platform_device *pdev) 516 516 { 517 - int err; 518 - 519 - err = gpiochip_remove(&ichx_priv.chip); 520 - if (err) { 521 - dev_err(&pdev->dev, "%s failed, %d\n", 522 - "gpiochip_remove()", err); 523 - return err; 524 - } 517 + gpiochip_remove(&ichx_priv.chip); 525 518 526 519 ichx_gpio_release_regions(ichx_priv.gpio_base, ichx_priv.use_gpio); 527 520 if (ichx_priv.pm_base)
+1 -5
drivers/gpio/gpio-it8761e.c
··· 217 217 static void __exit it8761e_gpio_exit(void) 218 218 { 219 219 if (gpio_ba) { 220 - int ret = gpiochip_remove(&it8761e_gpio_chip); 221 - 222 - WARN(ret, "%s(): gpiochip_remove() failed, ret=%d\n", 223 - __func__, ret); 224 - 220 + gpiochip_remove(&it8761e_gpio_chip); 225 221 release_region(gpio_ba, GPIO_IOSIZE); 226 222 gpio_ba = 0; 227 223 }
+1 -7
drivers/gpio/gpio-janz-ttl.c
··· 194 194 static int ttl_remove(struct platform_device *pdev) 195 195 { 196 196 struct ttl_module *mod = platform_get_drvdata(pdev); 197 - struct device *dev = &pdev->dev; 198 - int ret; 199 197 200 - ret = gpiochip_remove(&mod->gpio); 201 - if (ret) { 202 - dev_err(dev, "unable to remove GPIO chip\n"); 203 - return ret; 204 - } 198 + gpiochip_remove(&mod->gpio); 205 199 206 200 return 0; 207 201 }
+2 -1
drivers/gpio/gpio-kempld.c
··· 199 199 { 200 200 struct kempld_gpio_data *gpio = platform_get_drvdata(pdev); 201 201 202 - return gpiochip_remove(&gpio->chip); 202 + gpiochip_remove(&gpio->chip); 203 + return 0; 203 204 } 204 205 205 206 static struct platform_driver kempld_gpio_driver = {
+2 -1
drivers/gpio/gpio-lp3943.c
··· 216 216 { 217 217 struct lp3943_gpio *lp3943_gpio = platform_get_drvdata(pdev); 218 218 219 - return gpiochip_remove(&lp3943_gpio->chip); 219 + gpiochip_remove(&lp3943_gpio->chip); 220 + return 0; 220 221 } 221 222 222 223 static const struct of_device_id lp3943_gpio_of_match[] = {
+1 -4
drivers/gpio/gpio-lynxpoint.c
··· 465 465 static int lp_gpio_remove(struct platform_device *pdev) 466 466 { 467 467 struct lp_gpio *lg = platform_get_drvdata(pdev); 468 - int err; 469 468 pm_runtime_disable(&pdev->dev); 470 - err = gpiochip_remove(&lg->chip); 471 - if (err) 472 - dev_warn(&pdev->dev, "failed to remove gpio_chip.\n"); 469 + gpiochip_remove(&lg->chip); 473 470 return 0; 474 471 } 475 472
+4 -9
drivers/gpio/gpio-max730x.c
··· 228 228 int __max730x_remove(struct device *dev) 229 229 { 230 230 struct max7301 *ts = dev_get_drvdata(dev); 231 - int ret; 232 231 233 232 if (ts == NULL) 234 233 return -ENODEV; 235 234 236 235 /* Power down the chip and disable IRQ output */ 237 236 ts->write(dev, 0x04, 0x00); 238 - 239 - ret = gpiochip_remove(&ts->chip); 240 - if (!ret) 241 - mutex_destroy(&ts->lock); 242 - else 243 - dev_err(dev, "Failed to remove GPIO controller: %d\n", ret); 244 - 245 - return ret; 237 + gpiochip_remove(&ts->chip); 238 + mutex_destroy(&ts->lock); 239 + kfree(ts); 240 + return 0; 246 241 } 247 242 EXPORT_SYMBOL_GPL(__max730x_remove); 248 243
+1 -6
drivers/gpio/gpio-max732x.c
··· 676 676 } 677 677 } 678 678 679 - ret = gpiochip_remove(&chip->gpio_chip); 680 - if (ret) { 681 - dev_err(&client->dev, "%s failed, %d\n", 682 - "gpiochip_remove()", ret); 683 - return ret; 684 - } 679 + gpiochip_remove(&chip->gpio_chip); 685 680 686 681 max732x_irq_teardown(chip); 687 682
+3 -8
drivers/gpio/gpio-mc33880.c
··· 149 149 static int mc33880_remove(struct spi_device *spi) 150 150 { 151 151 struct mc33880 *mc; 152 - int ret; 153 152 154 153 mc = spi_get_drvdata(spi); 155 154 if (mc == NULL) 156 155 return -ENODEV; 157 156 158 - ret = gpiochip_remove(&mc->chip); 159 - if (!ret) 160 - mutex_destroy(&mc->lock); 161 - else 162 - dev_err(&spi->dev, "Failed to remove the GPIO controller: %d\n", 163 - ret); 157 + gpiochip_remove(&mc->chip); 158 + mutex_destroy(&mc->lock); 164 159 165 - return ret; 160 + return 0; 166 161 } 167 162 168 163 static struct spi_driver mc33880_driver = {
+2 -1
drivers/gpio/gpio-mc9s08dz60.c
··· 118 118 119 119 mc9s = i2c_get_clientdata(client); 120 120 121 - return gpiochip_remove(&mc9s->chip); 121 + gpiochip_remove(&mc9s->chip); 122 + return 0; 122 123 } 123 124 124 125 static const struct i2c_device_id mc9s08dz60_id[] = {
+7 -19
drivers/gpio/gpio-mcp23s08.c
··· 812 812 static int mcp230xx_remove(struct i2c_client *client) 813 813 { 814 814 struct mcp23s08 *mcp = i2c_get_clientdata(client); 815 - int status; 816 815 817 816 if (client->irq && mcp->irq_controller) 818 817 mcp23s08_irq_teardown(mcp); 819 818 820 - status = gpiochip_remove(&mcp->chip); 821 - if (status == 0) 822 - kfree(mcp); 819 + gpiochip_remove(&mcp->chip); 820 + kfree(mcp); 823 821 824 - return status; 822 + return 0; 825 823 } 826 824 827 825 static const struct i2c_device_id mcp230xx_id[] = { ··· 964 966 965 967 fail: 966 968 for (addr = 0; addr < ARRAY_SIZE(data->mcp); addr++) { 967 - int tmp; 968 969 969 970 if (!data->mcp[addr]) 970 971 continue; 971 - tmp = gpiochip_remove(&data->mcp[addr]->chip); 972 - if (tmp < 0) 973 - dev_err(&spi->dev, "%s --> %d\n", "remove", tmp); 972 + gpiochip_remove(&data->mcp[addr]->chip); 974 973 } 975 974 kfree(data); 976 975 return status; ··· 977 982 { 978 983 struct mcp23s08_driver_data *data = spi_get_drvdata(spi); 979 984 unsigned addr; 980 - int status = 0; 981 985 982 986 for (addr = 0; addr < ARRAY_SIZE(data->mcp); addr++) { 983 - int tmp; 984 987 985 988 if (!data->mcp[addr]) 986 989 continue; 987 990 988 - tmp = gpiochip_remove(&data->mcp[addr]->chip); 989 - if (tmp < 0) { 990 - dev_err(&spi->dev, "%s --> %d\n", "remove", tmp); 991 - status = tmp; 992 - } 991 + gpiochip_remove(&data->mcp[addr]->chip); 993 992 } 994 - if (status == 0) 995 - kfree(data); 996 - return status; 993 + kfree(data); 994 + return 0; 997 995 } 998 996 999 997 static const struct spi_device_id mcp23s08_ids[] = {
+2 -6
drivers/gpio/gpio-ml-ioh.c
··· 497 497 err_gpiochip_add: 498 498 while (--i >= 0) { 499 499 chip--; 500 - if (gpiochip_remove(&chip->gpio)) 501 - dev_err(&pdev->dev, "Failed gpiochip_remove(%d)\n", i); 500 + gpiochip_remove(&chip->gpio); 502 501 } 503 502 kfree(chip_save); 504 503 ··· 518 519 519 520 static void ioh_gpio_remove(struct pci_dev *pdev) 520 521 { 521 - int err; 522 522 int i; 523 523 struct ioh_gpio *chip = pci_get_drvdata(pdev); 524 524 void *chip_save; ··· 528 530 529 531 for (i = 0; i < 8; i++, chip++) { 530 532 irq_free_descs(chip->irq_base, num_ports[i]); 531 - err = gpiochip_remove(&chip->gpio); 532 - if (err) 533 - dev_err(&pdev->dev, "Failed gpiochip_remove\n"); 533 + gpiochip_remove(&chip->gpio); 534 534 } 535 535 536 536 chip = chip_save;
+1 -4
drivers/gpio/gpio-msm-v2.c
··· 438 438 439 439 static int msm_gpio_remove(struct platform_device *dev) 440 440 { 441 - int ret = gpiochip_remove(&msm_gpio.gpio_chip); 442 - 443 - if (ret < 0) 444 - return ret; 441 + gpiochip_remove(&msm_gpio.gpio_chip); 445 442 446 443 irq_set_handler(msm_gpio.summary_irq, NULL); 447 444
+1 -1
drivers/gpio/gpio-mxc.c
··· 485 485 out_irqdesc_free: 486 486 irq_free_descs(irq_base, 32); 487 487 out_gpiochip_remove: 488 - WARN_ON(gpiochip_remove(&port->bgc.gc) < 0); 488 + gpiochip_remove(&port->bgc.gc); 489 489 out_bgpio_remove: 490 490 bgpio_remove(&port->bgc); 491 491 out_bgio:
+2 -1
drivers/gpio/gpio-octeon.c
··· 129 129 static int octeon_gpio_remove(struct platform_device *pdev) 130 130 { 131 131 struct gpio_chip *chip = pdev->dev.platform_data; 132 - return gpiochip_remove(chip); 132 + gpiochip_remove(chip); 133 + return 0; 133 134 } 134 135 135 136 static struct of_device_id octeon_gpio_match[] = {
+2 -1
drivers/gpio/gpio-palmas.c
··· 210 210 { 211 211 struct palmas_gpio *palmas_gpio = platform_get_drvdata(pdev); 212 212 213 - return gpiochip_remove(&palmas_gpio->gpio_chip); 213 + gpiochip_remove(&palmas_gpio->gpio_chip); 214 + return 0; 214 215 } 215 216 216 217 static struct platform_driver palmas_gpio_driver = {
+1 -6
drivers/gpio/gpio-pca953x.c
··· 765 765 } 766 766 } 767 767 768 - ret = gpiochip_remove(&chip->gpio_chip); 769 - if (ret) { 770 - dev_err(&client->dev, "%s failed, %d\n", 771 - "gpiochip_remove()", ret); 772 - return ret; 773 - } 768 + gpiochip_remove(&chip->gpio_chip); 774 769 775 770 return 0; 776 771 }
+1 -3
drivers/gpio/gpio-pcf857x.c
··· 444 444 if (client->irq) 445 445 pcf857x_irq_domain_cleanup(gpio); 446 446 447 - status = gpiochip_remove(&gpio->chip); 448 - if (status) 449 - dev_err(&client->dev, "%s --> %d\n", "remove", status); 447 + gpiochip_remove(&gpio->chip); 450 448 return status; 451 449 } 452 450
+2 -8
drivers/gpio/gpio-pch.c
··· 426 426 427 427 err_request_irq: 428 428 irq_free_descs(irq_base, gpio_pins[chip->ioh]); 429 - 430 - if (gpiochip_remove(&chip->gpio)) 431 - dev_err(&pdev->dev, "%s gpiochip_remove failed\n", __func__); 429 + gpiochip_remove(&chip->gpio); 432 430 433 431 err_gpiochip_add: 434 432 pci_iounmap(pdev, chip->base); ··· 445 447 446 448 static void pch_gpio_remove(struct pci_dev *pdev) 447 449 { 448 - int err; 449 450 struct pch_gpio *chip = pci_get_drvdata(pdev); 450 451 451 452 if (chip->irq_base != -1) { ··· 453 456 irq_free_descs(chip->irq_base, gpio_pins[chip->ioh]); 454 457 } 455 458 456 - err = gpiochip_remove(&chip->gpio); 457 - if (err) 458 - dev_err(&pdev->dev, "Failed gpiochip_remove\n"); 459 - 459 + gpiochip_remove(&chip->gpio); 460 460 pci_iounmap(pdev, chip->base); 461 461 pci_release_regions(pdev); 462 462 pci_disable_device(pdev);
+2 -1
drivers/gpio/gpio-rc5t583.c
··· 148 148 { 149 149 struct rc5t583_gpio *rc5t583_gpio = platform_get_drvdata(pdev); 150 150 151 - return gpiochip_remove(&rc5t583_gpio->gpio_chip); 151 + gpiochip_remove(&rc5t583_gpio->gpio_chip); 152 + return 0; 152 153 } 153 154 154 155 static struct platform_driver rc5t583_gpio_driver = {
+1 -4
drivers/gpio/gpio-rcar.c
··· 471 471 static int gpio_rcar_remove(struct platform_device *pdev) 472 472 { 473 473 struct gpio_rcar_priv *p = platform_get_drvdata(pdev); 474 - int ret; 475 474 476 - ret = gpiochip_remove(&p->gpio_chip); 477 - if (ret) 478 - return ret; 475 + gpiochip_remove(&p->gpio_chip); 479 476 480 477 irq_domain_remove(p->irq_domain); 481 478 pm_runtime_put(&pdev->dev);
+2 -5
drivers/gpio/gpio-rdc321x.c
··· 199 199 200 200 static int rdc321x_gpio_remove(struct platform_device *pdev) 201 201 { 202 - int ret; 203 202 struct rdc321x_gpio *rdc321x_gpio_dev = platform_get_drvdata(pdev); 204 203 205 - ret = gpiochip_remove(&rdc321x_gpio_dev->chip); 206 - if (ret) 207 - dev_err(&pdev->dev, "failed to unregister chip\n"); 204 + gpiochip_remove(&rdc321x_gpio_dev->chip); 208 205 209 - return ret; 206 + return 0; 210 207 } 211 208 212 209 static struct platform_driver rdc321x_gpio_driver = {
+3 -13
drivers/gpio/gpio-sch.c
··· 290 290 return 0; 291 291 292 292 err_sch_gpio_resume: 293 - if (gpiochip_remove(&sch_gpio_core)) 294 - dev_err(&pdev->dev, "%s gpiochip_remove failed\n", __func__); 293 + gpiochip_remove(&sch_gpio_core); 295 294 296 295 err_sch_gpio_core: 297 296 release_region(res->start, resource_size(res)); ··· 303 304 { 304 305 struct resource *res; 305 306 if (gpio_ba) { 306 - int err; 307 307 308 - err = gpiochip_remove(&sch_gpio_core); 309 - if (err) 310 - dev_err(&pdev->dev, "%s failed, %d\n", 311 - "gpiochip_remove()", err); 312 - err = gpiochip_remove(&sch_gpio_resume); 313 - if (err) 314 - dev_err(&pdev->dev, "%s failed, %d\n", 315 - "gpiochip_remove()", err); 308 + gpiochip_remove(&sch_gpio_core); 309 + gpiochip_remove(&sch_gpio_resume); 316 310 317 311 res = platform_get_resource(pdev, IORESOURCE_IO, 0); 318 312 319 313 release_region(res->start, resource_size(res)); 320 314 gpio_ba = 0; 321 - 322 - return err; 323 315 } 324 316 325 317 return 0;
+2 -4
drivers/gpio/gpio-sch311x.c
··· 291 291 { 292 292 struct sch311x_pdev_data *pdata = pdev->dev.platform_data; 293 293 struct sch311x_gpio_priv *priv = platform_get_drvdata(pdev); 294 - int err, i; 294 + int i; 295 295 296 296 release_region(pdata->runtime_reg + GP1, 6); 297 297 298 298 for (i = 0; i < ARRAY_SIZE(priv->blocks); i++) { 299 - err = gpiochip_remove(&priv->blocks[i].chip); 300 - if (err) 301 - return err; 299 + gpiochip_remove(&priv->blocks[i].chip); 302 300 dev_info(&pdev->dev, 303 301 "SMSC SCH311x GPIO block %d unregistered.\n", i); 304 302 }
+1 -3
drivers/gpio/gpio-sodaville.c
··· 265 265 free_irq(pdev->irq, sd); 266 266 irq_free_descs(sd->irq_base, SDV_NUM_PUB_GPIOS); 267 267 268 - if (gpiochip_remove(&sd->bgpio.gc)) 269 - dev_err(&pdev->dev, "gpiochip_remove() failed.\n"); 270 - 268 + gpiochip_remove(&sd->bgpio.gc); 271 269 pci_release_region(pdev, GPIO_BAR); 272 270 iounmap(sd->gpio_pub_base); 273 271 pci_disable_device(pdev);
+1 -7
drivers/gpio/gpio-stmpe.c
··· 353 353 struct stmpe_gpio *stmpe_gpio = platform_get_drvdata(pdev); 354 354 struct stmpe *stmpe = stmpe_gpio->stmpe; 355 355 struct stmpe_gpio_platform_data *pdata = stmpe->pdata->gpio; 356 - int ret; 357 356 358 357 if (pdata && pdata->remove) 359 358 pdata->remove(stmpe, stmpe_gpio->chip.base); 360 359 361 - ret = gpiochip_remove(&stmpe_gpio->chip); 362 - if (ret < 0) { 363 - dev_err(stmpe_gpio->dev, 364 - "unable to remove gpiochip: %d\n", ret); 365 - return ret; 366 - } 360 + gpiochip_remove(&stmpe_gpio->chip); 367 361 368 362 stmpe_disable(stmpe, STMPE_BLOCK_GPIO); 369 363
+2 -5
drivers/gpio/gpio-sx150x.c
··· 615 615 616 616 return 0; 617 617 probe_fail_post_gpiochip_add: 618 - WARN_ON(gpiochip_remove(&chip->gpio_chip) < 0); 618 + gpiochip_remove(&chip->gpio_chip); 619 619 return rc; 620 620 } 621 621 622 622 static int sx150x_remove(struct i2c_client *client) 623 623 { 624 624 struct sx150x_chip *chip; 625 - int rc; 626 625 627 626 chip = i2c_get_clientdata(client); 628 - rc = gpiochip_remove(&chip->gpio_chip); 629 - if (rc < 0) 630 - return rc; 627 + gpiochip_remove(&chip->gpio_chip); 631 628 632 629 if (chip->irq_summary >= 0) 633 630 sx150x_remove_irq_chip(chip);
+2 -1
drivers/gpio/gpio-syscon.c
··· 172 172 { 173 173 struct syscon_gpio_priv *priv = platform_get_drvdata(pdev); 174 174 175 - return gpiochip_remove(&priv->chip); 175 + gpiochip_remove(&priv->chip); 176 + return 0; 176 177 } 177 178 178 179 static struct platform_driver syscon_gpio_driver = {
+1 -4
drivers/gpio/gpio-tb10x.c
··· 291 291 static int __exit tb10x_gpio_remove(struct platform_device *pdev) 292 292 { 293 293 struct tb10x_gpio *tb10x_gpio = platform_get_drvdata(pdev); 294 - int ret; 295 294 296 295 if (tb10x_gpio->gc.to_irq) { 297 296 irq_remove_generic_chip(tb10x_gpio->domain->gc->gc[0], ··· 299 300 irq_domain_remove(tb10x_gpio->domain); 300 301 free_irq(tb10x_gpio->irq, tb10x_gpio); 301 302 } 302 - ret = gpiochip_remove(&tb10x_gpio->gc); 303 - if (ret) 304 - return ret; 303 + gpiochip_remove(&tb10x_gpio->gc); 305 304 306 305 return 0; 307 306 }
+1 -7
drivers/gpio/gpio-tc3589x.c
··· 313 313 struct tc3589x_gpio *tc3589x_gpio = platform_get_drvdata(pdev); 314 314 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; 315 315 struct tc3589x_gpio_platform_data *pdata = tc3589x->pdata->gpio; 316 - int ret; 317 316 318 317 if (pdata && pdata->remove) 319 318 pdata->remove(tc3589x, tc3589x_gpio->chip.base); 320 319 321 - ret = gpiochip_remove(&tc3589x_gpio->chip); 322 - if (ret < 0) { 323 - dev_err(tc3589x_gpio->dev, 324 - "unable to remove gpiochip: %d\n", ret); 325 - return ret; 326 - } 320 + gpiochip_remove(&tc3589x_gpio->chip); 327 321 328 322 return 0; 329 323 }
+1 -4
drivers/gpio/gpio-timberdale.c
··· 307 307 308 308 static int timbgpio_remove(struct platform_device *pdev) 309 309 { 310 - int err; 311 310 struct timbgpio_platform_data *pdata = dev_get_platdata(&pdev->dev); 312 311 struct timbgpio *tgpio = platform_get_drvdata(pdev); 313 312 int irq = platform_get_irq(pdev, 0); ··· 322 323 irq_set_handler_data(irq, NULL); 323 324 } 324 325 325 - err = gpiochip_remove(&tgpio->gpio); 326 - if (err) 327 - printk(KERN_ERR DRIVER_NAME": failed to remove gpio_chip\n"); 326 + gpiochip_remove(&tgpio->gpio); 328 327 329 328 return 0; 330 329 }
+2 -1
drivers/gpio/gpio-tps6586x.c
··· 137 137 { 138 138 struct tps6586x_gpio *tps6586x_gpio = platform_get_drvdata(pdev); 139 139 140 - return gpiochip_remove(&tps6586x_gpio->gpio_chip); 140 + gpiochip_remove(&tps6586x_gpio->gpio_chip); 141 + return 0; 141 142 } 142 143 143 144 static struct platform_driver tps6586x_gpio_driver = {
+2 -1
drivers/gpio/gpio-tps65910.c
··· 190 190 { 191 191 struct tps65910_gpio *tps65910_gpio = platform_get_drvdata(pdev); 192 192 193 - return gpiochip_remove(&tps65910_gpio->gpio_chip); 193 + gpiochip_remove(&tps65910_gpio->gpio_chip); 194 + return 0; 194 195 } 195 196 196 197 static struct platform_driver tps65910_gpio_driver = {
+2 -1
drivers/gpio/gpio-tps65912.c
··· 117 117 { 118 118 struct tps65912_gpio_data *tps65912_gpio = platform_get_drvdata(pdev); 119 119 120 - return gpiochip_remove(&tps65912_gpio->gpio_chip); 120 + gpiochip_remove(&tps65912_gpio->gpio_chip); 121 + return 0; 121 122 } 122 123 123 124 static struct platform_driver tps65912_gpio_driver = {
+3 -3
drivers/gpio/gpio-ts5500.c
··· 427 427 428 428 return 0; 429 429 cleanup: 430 - if (gpiochip_remove(&priv->gpio_chip)) 431 - dev_err(dev, "failed to remove gpio chip\n"); 430 + gpiochip_remove(&priv->gpio_chip); 432 431 return ret; 433 432 } 434 433 ··· 436 437 struct ts5500_priv *priv = platform_get_drvdata(pdev); 437 438 438 439 ts5500_disable_irq(priv); 439 - return gpiochip_remove(&priv->gpio_chip); 440 + gpiochip_remove(&priv->gpio_chip); 441 + return 0; 440 442 } 441 443 442 444 static struct platform_device_id ts5500_dio_ids[] = {
+1 -3
drivers/gpio/gpio-twl4030.c
··· 583 583 } 584 584 } 585 585 586 - status = gpiochip_remove(&priv->gpio_chip); 587 - if (status < 0) 588 - return status; 586 + gpiochip_remove(&priv->gpio_chip); 589 587 590 588 if (is_module()) 591 589 return 0;
+2 -1
drivers/gpio/gpio-twl6040.c
··· 111 111 112 112 static int gpo_twl6040_remove(struct platform_device *pdev) 113 113 { 114 - return gpiochip_remove(&twl6040gpo_chip); 114 + gpiochip_remove(&twl6040gpo_chip); 115 + return 0; 115 116 } 116 117 117 118 /* Note: this hardware lives inside an I2C-based multi-function device. */
+1 -1
drivers/gpio/gpio-ucb1400.c
··· 89 89 return err; 90 90 } 91 91 92 - err = gpiochip_remove(&ucb->gc); 92 + gpiochip_remove(&ucb->gc); 93 93 return err; 94 94 } 95 95
+3 -7
drivers/gpio/gpio-viperboard.c
··· 446 446 return ret; 447 447 448 448 err_gpiob: 449 - if (gpiochip_remove(&vb_gpio->gpioa)) 450 - dev_err(&pdev->dev, "%s gpiochip_remove failed\n", __func__); 449 + gpiochip_remove(&vb_gpio->gpioa); 451 450 452 451 err_gpioa: 453 452 return ret; ··· 455 456 static int vprbrd_gpio_remove(struct platform_device *pdev) 456 457 { 457 458 struct vprbrd_gpio *vb_gpio = platform_get_drvdata(pdev); 458 - int ret; 459 459 460 - ret = gpiochip_remove(&vb_gpio->gpiob); 461 - if (ret == 0) 462 - ret = gpiochip_remove(&vb_gpio->gpioa); 460 + gpiochip_remove(&vb_gpio->gpiob); 463 461 464 - return ret; 462 + return 0; 465 463 } 466 464 467 465 static struct platform_driver vprbrd_gpio_driver = {
+1 -2
drivers/gpio/gpio-vx855.c
··· 288 288 struct vx855_gpio *vg = platform_get_drvdata(pdev); 289 289 struct resource *res; 290 290 291 - if (gpiochip_remove(&vg->gpio)) 292 - dev_err(&pdev->dev, "unable to remove gpio_chip?\n"); 291 + gpiochip_remove(&vg->gpio); 293 292 294 293 if (vg->gpi_reserved) { 295 294 res = platform_get_resource(pdev, IORESOURCE_IO, 0);
+2 -1
drivers/gpio/gpio-wm831x.c
··· 279 279 { 280 280 struct wm831x_gpio *wm831x_gpio = platform_get_drvdata(pdev); 281 281 282 - return gpiochip_remove(&wm831x_gpio->gpio_chip); 282 + gpiochip_remove(&wm831x_gpio->gpio_chip); 283 + return 0; 283 284 } 284 285 285 286 static struct platform_driver wm831x_gpio_driver = {
+2 -1
drivers/gpio/gpio-wm8350.c
··· 145 145 { 146 146 struct wm8350_gpio_data *wm8350_gpio = platform_get_drvdata(pdev); 147 147 148 - return gpiochip_remove(&wm8350_gpio->gpio_chip); 148 + gpiochip_remove(&wm8350_gpio->gpio_chip); 149 + return 0; 149 150 } 150 151 151 152 static struct platform_driver wm8350_gpio_driver = {
+2 -1
drivers/gpio/gpio-wm8994.c
··· 285 285 { 286 286 struct wm8994_gpio *wm8994_gpio = platform_get_drvdata(pdev); 287 287 288 - return gpiochip_remove(&wm8994_gpio->gpio_chip); 288 + gpiochip_remove(&wm8994_gpio->gpio_chip); 289 + return 0; 289 290 } 290 291 291 292 static struct platform_driver wm8994_gpio_driver = {