|
@@ -416,7 +416,8 @@ static int gpio_setup_irq(struct gpio_desc *desc, struct device *dev,
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
free_sd:
|
|
free_sd:
|
|
- sysfs_put(pdesc->value_sd);
|
|
|
|
|
|
+ if (pdesc)
|
|
|
|
+ sysfs_put(pdesc->value_sd);
|
|
free_id:
|
|
free_id:
|
|
idr_remove(&pdesc_idr, id);
|
|
idr_remove(&pdesc_idr, id);
|
|
desc->flags &= GPIO_FLAGS_MASK;
|
|
desc->flags &= GPIO_FLAGS_MASK;
|