]> Pileus Git - ~andy/linux/commitdiff
Merge remote-tracking branch 'regulator/topic/s5m8767' into v3.9-rc8
authorMark Brown <broonie@sirena.org.uk>
Sun, 28 Apr 2013 01:13:46 +0000 (02:13 +0100)
committerMark Brown <broonie@sirena.org.uk>
Sun, 28 Apr 2013 01:13:46 +0000 (02:13 +0100)
1  2 
drivers/regulator/s5m8767.c

index 2dd74e254397cfb0cd1ad0af7f3c2aa635b78097,8e56198167e8f5c2d3bb00a4de5acdfa94fbc369..c24448bc43cfb71658d88afea9779e2b47471495
@@@ -549,7 -549,7 +549,7 @@@ static int s5m8767_pmic_dt_parse_pdata(
  
        rmode = devm_kzalloc(&pdev->dev, sizeof(*rmode) *
                                pdata->num_regulators, GFP_KERNEL);
-       if (!rdata) {
+       if (!rmode) {
                dev_err(iodev->dev,
                        "could not allocate memory for regulator mode\n");
                return -ENOMEM;
@@@ -923,7 -923,8 +923,7 @@@ static int s5m8767_pmic_probe(struct pl
        return 0;
  err:
        for (i = 0; i < s5m8767->num_regulators; i++)
 -              if (rdev[i])
 -                      regulator_unregister(rdev[i]);
 +              regulator_unregister(rdev[i]);
  
        return ret;
  }
@@@ -935,7 -936,8 +935,7 @@@ static int s5m8767_pmic_remove(struct p
        int i;
  
        for (i = 0; i < s5m8767->num_regulators; i++)
 -              if (rdev[i])
 -                      regulator_unregister(rdev[i]);
 +              regulator_unregister(rdev[i]);
  
        return 0;
  }