summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/quirks.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/core/quirks.h')
-rw-r--r--drivers/mmc/core/quirks.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h
index f879dc63d936..be4393988086 100644
--- a/drivers/mmc/core/quirks.h
+++ b/drivers/mmc/core/quirks.h
@@ -163,8 +163,10 @@ static inline bool mmc_fixup_of_compatible_match(struct mmc_card *card,
struct device_node *np;
for_each_child_of_node(mmc_dev(card->host)->of_node, np) {
- if (of_device_is_compatible(np, compatible))
+ if (of_device_is_compatible(np, compatible)) {
+ of_node_put(np);
return true;
+ }
}
return false;