File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ static void acpi_gpiochip_request_interrupts(struct acpi_gpio_chip *acpi_gpio)
233
233
{
234
234
struct gpio_chip * chip = acpi_gpio -> chip ;
235
235
236
- if (!chip -> dev || ! chip -> to_irq )
236
+ if (!chip -> to_irq )
237
237
return ;
238
238
239
239
INIT_LIST_HEAD (& acpi_gpio -> events );
@@ -253,7 +253,7 @@ static void acpi_gpiochip_free_interrupts(struct acpi_gpio_chip *acpi_gpio)
253
253
struct acpi_gpio_event * event , * ep ;
254
254
struct gpio_chip * chip = acpi_gpio -> chip ;
255
255
256
- if (!chip -> dev || ! chip -> to_irq )
256
+ if (!chip -> to_irq )
257
257
return ;
258
258
259
259
list_for_each_entry_safe_reverse (event , ep , & acpi_gpio -> events , node ) {
@@ -501,6 +501,9 @@ void acpi_gpiochip_add(struct gpio_chip *chip)
501
501
acpi_handle handle ;
502
502
acpi_status status ;
503
503
504
+ if (!chip || !chip -> dev )
505
+ return ;
506
+
504
507
handle = ACPI_HANDLE (chip -> dev );
505
508
if (!handle )
506
509
return ;
@@ -531,6 +534,9 @@ void acpi_gpiochip_remove(struct gpio_chip *chip)
531
534
acpi_handle handle ;
532
535
acpi_status status ;
533
536
537
+ if (!chip || !chip -> dev )
538
+ return ;
539
+
534
540
handle = ACPI_HANDLE (chip -> dev );
535
541
if (!handle )
536
542
return ;
You can’t perform that action at this time.
0 commit comments