Explorar o código

arm: msm: return error pointer in vreg_get if vreg not found

Signed-off-by: Steve Muckle <smuckle@quicinc.com>
Steve Muckle %!s(int64=15) %!d(string=hai) anos
pai
achega
0c50b444b6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/arm/mach-msm/vreg.c

+ 1 - 1
arch/arm/mach-msm/vreg.c

@@ -70,7 +70,7 @@ struct vreg *vreg_get(struct device *dev, const char *id)
 		if (!strcmp(vregs[n].name, id))
 			return vregs + n;
 	}
-	return 0;
+	return ERR_PTR(-ENOENT);
 }
 
 void vreg_put(struct vreg *vreg)