Thread (6 messages) flat view 6 messages, 2 authors, 2012-09-11
STALE5120d

[PATCH 2/2] ARM: dt: tegra: harmony: add regulators

From: Stephen Warren <hidden>
Date: 2012-08-28 23:06:11
Also in: linux-tegra

On 08/28/2012 08:04 AM, Laxman Dewangan wrote:
On Tuesday 28 August 2012 12:40 PM, Stephen Warren wrote:
quoted
  #include "board.h"
-#include "board-harmony.h"

  #ifdef CONFIG_TEGRA_PCI

  int __init harmony_pcie_init(void)
  {
-       struct regulator *regulator = NULL;
+       struct regulator *regulator_1v5, *regulator_pex;
         int err;

-       err = gpio_request(TEGRA_GPIO_EN_VDD_1V05_GPIO, "EN_VDD_1V05");
-       if (err)
-               return err;
+       regulator_1v5 = regulator_get(NULL, "vdd_1v5");
+       if (IS_ERR_OR_NULL(regulator_1v5)) {
+               err = PTR_ERR(regulator_1v5);
+               goto err_reg;
+       }
You need to return in case of err otherwise it will cause the crash in
regulator_disable() with NULL argument.
OK, I think I've fixed this and the crash, and re-pushed my personal
linux-next_common. I don't suppose you could retest this. Thanks very much!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help