diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-05-27 11:38:08 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-27 11:38:08 -0400 |
commit | a58bdba749b36069ec372da9c9fd16017b6c0b47 (patch) | |
tree | 95c79448427425d1c05712a7c7fb98ed42e41539 /drivers/char/tpm/tpm_ppi.c | |
parent | 00a6d7b6762c27d441e9ac8faff36384bc0fc180 (diff) | |
parent | 51fa31d462f32e1ffdf957802dcab1dc20d2f243 (diff) |
Merge branch 'topic/firewire' into for-next
This is a merge of big firewire audio stack updates by Takashi Sakamoto.
Diffstat (limited to 'drivers/char/tpm/tpm_ppi.c')
-rw-r--r-- | drivers/char/tpm/tpm_ppi.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c index b3ea223585bd..61dcc8011ec7 100644 --- a/drivers/char/tpm/tpm_ppi.c +++ b/drivers/char/tpm/tpm_ppi.c | |||
@@ -328,13 +328,11 @@ int tpm_add_ppi(struct kobject *parent) | |||
328 | /* Cache TPM ACPI handle and version string */ | 328 | /* Cache TPM ACPI handle and version string */ |
329 | acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, | 329 | acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, |
330 | ppi_callback, NULL, NULL, &tpm_ppi_handle); | 330 | ppi_callback, NULL, NULL, &tpm_ppi_handle); |
331 | if (tpm_ppi_handle == NULL) | 331 | return tpm_ppi_handle ? sysfs_create_group(parent, &ppi_attr_grp) : 0; |
332 | return -ENODEV; | ||
333 | |||
334 | return sysfs_create_group(parent, &ppi_attr_grp); | ||
335 | } | 332 | } |
336 | 333 | ||
337 | void tpm_remove_ppi(struct kobject *parent) | 334 | void tpm_remove_ppi(struct kobject *parent) |
338 | { | 335 | { |
339 | sysfs_remove_group(parent, &ppi_attr_grp); | 336 | if (tpm_ppi_handle) |
337 | sysfs_remove_group(parent, &ppi_attr_grp); | ||
340 | } | 338 | } |