mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 20:48:49 +08:00
memory: tegra: Changes for v4.8-rc1
Contains three reference count fixes from coccinelle. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJXdn6bAAoJEN0jrNd/PrOhXy8P/Rz/UWWWl5NxpXgtE2izybV/ Ymcz6IN+HSxCS1gPGrwk1nPfuAKMxG6TqfK6q/nOTKTfjbQdyMGXkyLYTtWIWvcN 9noD25p/9GrsqzqsfVVnI/a2HXPGzCRU7Si4c14BYpgJn24oB9I12UKXUAqNZUms Y2WAFxXe0BVL6ypsMKJ3PmCqf5lxwNQRcc6LCb9djocHnzG388rirOkiMy6dQC4p 8A0XzUxC/7ayFoAN5BEn/F5cfV5mtN7cdpFBgWB2e5UaLBG88QN8cw6fOvjxixay K7DGoae0rtDFy2F53wEE6qljsMcj9BU6ta3Mr7TQW2AImk6Eqr5uWvKlckqvZzHd 7lqHfORjgL+Am873DMTB7sRxjD4amhfSoIkGz7OuXXR1sH7CTtvBTINFRxhoLVQu 6U6QS/t1uzDiYBSWEKFJjOsDCOCGD33GTOhKS5OeHGMekfnwp3jlVEBi573z5XOw /SSDZ3ly6sHk3zOCyF5gc2y+pWP2Oo0OtMgSAHVgrtzfyE8t16PapOl5u3NJnSKX YujWLfnQhQGm1OOYJQxOXA/081Jlul8Q119ZZI1woeL3Nuj4N3YxAbnjvnSJktLV 7GfCfzweDR9Bka/xwnZfqE4fB09PFBnskbev5fIVFzcmtNj711/hoDcFabeIcjJ/ iwM5rKKyqsQchrKK3hRr =XgO5 -----END PGP SIGNATURE----- Merge tag 'tegra-for-4.8-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers memory: tegra: Changes for v4.8-rc1 Contains three reference count fixes from coccinelle. * tag 'tegra-for-4.8-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra: mc: Add missing of_node_put() memory: tegra: Delete unneeded of_node_put() memory: tegra: tegra124-emc: Add missing of_node_put() Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
e1d1dfc2c2
@ -186,8 +186,10 @@ static int load_timings(struct tegra_mc *mc, struct device_node *node)
|
||||
timing = &mc->timings[i++];
|
||||
|
||||
err = load_one_timing(mc, timing, child);
|
||||
if (err)
|
||||
if (err) {
|
||||
of_node_put(child);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -206,15 +208,13 @@ static int tegra_mc_setup_timings(struct tegra_mc *mc)
|
||||
for_each_child_of_node(mc->dev->of_node, node) {
|
||||
err = of_property_read_u32(node, "nvidia,ram-code",
|
||||
&node_ram_code);
|
||||
if (err || (node_ram_code != ram_code)) {
|
||||
of_node_put(node);
|
||||
if (err || (node_ram_code != ram_code))
|
||||
continue;
|
||||
}
|
||||
|
||||
err = load_timings(mc, node);
|
||||
of_node_put(node);
|
||||
if (err)
|
||||
return err;
|
||||
of_node_put(node);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -970,8 +970,10 @@ static int tegra_emc_load_timings_from_dt(struct tegra_emc *emc,
|
||||
timing = &emc->timings[i++];
|
||||
|
||||
err = load_one_timing_from_dt(emc, timing, child);
|
||||
if (err)
|
||||
if (err) {
|
||||
of_node_put(child);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
sort(emc->timings, emc->num_timings, sizeof(*timing), cmp_timings,
|
||||
@ -995,10 +997,8 @@ tegra_emc_find_node_by_ram_code(struct device_node *node, u32 ram_code)
|
||||
u32 value;
|
||||
|
||||
err = of_property_read_u32(np, "nvidia,ram-code", &value);
|
||||
if (err || (value != ram_code)) {
|
||||
of_node_put(np);
|
||||
if (err || (value != ram_code))
|
||||
continue;
|
||||
}
|
||||
|
||||
return np;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user