summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os/sunpm.c
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-12-26 09:23:25 +0200
committerToomas Soome <tsoome@me.com>2020-01-29 23:48:15 +0200
commitc6f039c73ee9eb7e4acb232afaca51cdf9d30ff3 (patch)
tree4906910bfbdbc344a6c48f8760f09be68e9ac7c4 /usr/src/uts/common/os/sunpm.c
parent7093fd72e0be9a255aa4b1ed00a701f80699ac7d (diff)
downloadillumos-joyent-c6f039c73ee9eb7e4acb232afaca51cdf9d30ff3.tar.gz
12172 genunix: variable may be used uninitialized
Reviewed by: John Levon <john.levon@joyent.com> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/common/os/sunpm.c')
-rw-r--r--usr/src/uts/common/os/sunpm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/uts/common/os/sunpm.c b/usr/src/uts/common/os/sunpm.c
index 2fde5dfd89..3ce7cc530d 100644
--- a/usr/src/uts/common/os/sunpm.c
+++ b/usr/src/uts/common/os/sunpm.c
@@ -1981,6 +1981,7 @@ pm_free_kept(char *path)
size_t length;
char **paths;
+ paths = NULL;
for (dp = pm_dep_head; dp; dp = dp->pdr_next) {
if (dp->pdr_kept_count == 0)
continue;
@@ -2010,10 +2011,7 @@ pm_free_kept(char *path)
}
/* Now free the old array and point to the new one */
kmem_free(dp->pdr_kept_paths, count * sizeof (char **));
- if (dp->pdr_kept_count)
- dp->pdr_kept_paths = paths;
- else
- dp->pdr_kept_paths = NULL;
+ dp->pdr_kept_paths = paths;
}
}
@@ -3959,6 +3957,7 @@ digit:
return (NULL);
hexval:
+ offset = 0;
for (np = numbuf; *np; np++) {
if (*np >= 'a' && *np <= 'f')
offset = 'a' - 10;
@@ -6430,6 +6429,7 @@ pm_process_dep_request(pm_dep_wk_t *work)
(work->pdw_keeper ? work->pdw_keeper : "NULL"),
(work->pdw_kept ? work->pdw_kept : "NULL")))
+ ret = 0;
switch (work->pdw_type) {
case PM_DEP_WK_POWER_ON:
/* Bring up the kept devices and put a hold on them */