aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/tpm/tpm-chip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
index e5950131bd90..447b6ca09826 100644
--- a/drivers/char/tpm/tpm-chip.c
+++ b/drivers/char/tpm/tpm-chip.c
@@ -84,7 +84,7 @@ EXPORT_SYMBOL_GPL(tpm_put_ops);
84 * 84 *
85 * The return'd chip has been tpm_try_get_ops'd and must be released via 85 * The return'd chip has been tpm_try_get_ops'd and must be released via
86 * tpm_put_ops 86 * tpm_put_ops
87 */ 87 */
88struct tpm_chip *tpm_chip_find_get(int chip_num) 88struct tpm_chip *tpm_chip_find_get(int chip_num)
89{ 89{
90 struct tpm_chip *chip, *res = NULL; 90 struct tpm_chip *chip, *res = NULL;
@@ -103,7 +103,7 @@ struct tpm_chip *tpm_chip_find_get(int chip_num)
103 } 103 }
104 } while (chip_prev != chip_num); 104 } while (chip_prev != chip_num);
105 } else { 105 } else {
106 chip = idr_find_slowpath(&dev_nums_idr, chip_num); 106 chip = idr_find(&dev_nums_idr, chip_num);
107 if (chip && !tpm_try_get_ops(chip)) 107 if (chip && !tpm_try_get_ops(chip))
108 res = chip; 108 res = chip;
109 } 109 }