Commit 8aa30418 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'gpio-fixes-for-v6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - fix incorrect retval check in gpio-loongson-64bit

 - fix GPIO counting with ACPI

* tag 'gpio-fixes-for-v6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: loongson-64bit: Fix incorrect NULL check after devm_kcalloc()
  gpiolib: acpi: Fix gpio count with string references
parents 8770bd8f e34f77b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -263,7 +263,7 @@ static int loongson_gpio_init_irqchip(struct platform_device *pdev,
	chip->irq.num_parents = data->intr_num;
	chip->irq.parents = devm_kcalloc(&pdev->dev, data->intr_num,
					 sizeof(*chip->irq.parents), GFP_KERNEL);
	if (!chip->parent)
	if (!chip->irq.parents)
		return -ENOMEM;

	for (i = 0; i < data->intr_num; i++) {
+1 −0
Original line number Diff line number Diff line
@@ -1359,6 +1359,7 @@ static int acpi_gpio_package_count(const union acpi_object *obj)
	while (element < end) {
		switch (element->type) {
		case ACPI_TYPE_LOCAL_REFERENCE:
		case ACPI_TYPE_STRING:
			element += 3;
			fallthrough;
		case ACPI_TYPE_INTEGER: