History

Merge tag 'gpio-v5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij: "Not much to say about them, regular fixes: - Fix a bug on the errorpath of gpiochip_add_data_with_key() - IRQ type setting on the spreadtrum GPIO driver" * tag 'gpio-v5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: Fix gpiochip_add_data_with_key() error path gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC

Linus Torvalds committed 7 years ago

Commit 29279d22 parents 4e40f0f 35779892 files · +9 −4Browse files

Unified · Split

2 files
  1. drivers/gpio/gpio-eic-sprd.c +1 −0
  2. drivers/gpio/gpiolib.c +8 −4
drivers/gpio/gpio-eic-sprd.c+1−0
@@ -414,6 +414,7 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type) · 413 unmodified lines
414414 irq_set_handler_locked(data, handle_edge_irq);
415415 break;
416416 case IRQ_TYPE_EDGE_BOTH:
417+ sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 0);
417418 sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 1);
418419 irq_set_handler_locked(data, handle_edge_irq);
419420 break;
drivers/gpio/gpiolib.c+8−4
@@ -1379,7 +1379,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data, · 1378 unmodified lines
13791379
13801380 status = gpiochip_add_irqchip(chip, lock_key, request_key);
13811381 if (status)
1382− goto err_remove_chip;
1382+ goto err_free_gpiochip_mask;
13831383
13841384 status = of_gpiochip_add(chip);
13851385 if (status)
@@ -1387,7 +1387,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data, · 1 unmodified line
13871387
13881388 status = gpiochip_init_valid_mask(chip);
13891389 if (status)
1390− goto err_remove_chip;
1390+ goto err_remove_of_chip;
13911391
13921392 for (i = 0; i < chip->ngpio; i++) {
13931393 struct gpio_desc *desc = &gdev->descs[i];
@@ -1415,14 +1415,18 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data, · 21 unmodified lines
14151415 if (gpiolib_initialized) {
14161416 status = gpiochip_setup_dev(gdev);
14171417 if (status)
1418− goto err_remove_chip;
1418+ goto err_remove_acpi_chip;
14191419 }
14201420 return 0;
14211421
1422−err_remove_chip:
1422+err_remove_acpi_chip:
14231423 acpi_gpiochip_remove(chip);
1424+err_remove_of_chip:
14241425 gpiochip_free_hogs(chip);
14251426 of_gpiochip_remove(chip);
1427+err_remove_chip:
1428+ gpiochip_irqchip_remove(chip);
1429+err_free_gpiochip_mask:
14261430 gpiochip_free_valid_mask(chip);
14271431 err_remove_irqchip_mask:
14281432 gpiochip_irqchip_free_valid_mask(chip);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t