]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commitdiff
minios: clean up unneeded "err = NULL" in frontend drivers
authorBen Cressey <bcressey@amazon.com>
Fri, 6 Sep 2013 19:52:06 +0000 (12:52 -0700)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 10 Sep 2013 09:55:10 +0000 (10:55 +0100)
This patch removes cases where the error message pointer is already
NULL and is then set to NULL. These are harmless, but suggest
incorrect practice: the pointer should be passed to free() to
deallocate memory prior to reassignment. There are no functional
changes in this patch.

Signed-off-by: Ben Cressey <bcressey@amazon.com>
Reviewed-by: Matt Wilson <msw@amazon.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
[msw: split a larger patch from Ben into this cleanup patch]
Signed-off-by: Matt Wilson <msw@amazon.com>
blkfront.c
fbfront.c
netfront.c
pcifront.c

index 73837f65b787087a0b8e8982a03ab400f67c1bd5..dd5e95f295baaac127638b69a25fd993742ef5b8 100644 (file)
@@ -289,7 +289,6 @@ void shutdown_blkfront(struct blkfront_dev *dev)
                 XenbusStateInitialising, err);
         goto close;
     }
-    err = NULL;
     state = xenbus_read_integer(path);
     while (err == NULL && (state < XenbusStateInitWait || state >= XenbusStateClosed))
         err = xenbus_wait_for_state_change(path, &state, &dev->events);
index 914849695337ba3de70a7c47d963afca80f2181f..8b4466a5900871b1f87f3026db5f390da2eb335b 100644 (file)
--- a/fbfront.c
+++ b/fbfront.c
@@ -272,7 +272,6 @@ void shutdown_kbdfront(struct kbdfront_dev *dev)
                 XenbusStateInitialising, err);
         goto close_kbdfront;
     }
-    err = NULL;
     state = xenbus_read_integer(path);
     while (err == NULL && (state < XenbusStateInitWait || state >= XenbusStateClosed))
     err = xenbus_wait_for_state_change(path, &state, &dev->events);
@@ -664,8 +663,6 @@ void shutdown_fbfront(struct fbfront_dev *dev)
                 XenbusStateInitialising, err);
         goto close_fbfront;
     }
-
-    err = NULL;
     state = xenbus_read_integer(path);
     while (err == NULL && (state < XenbusStateInitWait || state >= XenbusStateClosed))
         err = xenbus_wait_for_state_change(path, &state, &dev->events);
index 7947fc256b83bfda1b193f875dd6e347bfa048c4..dc29f14075a68c488b6291700984d97feedb852b 100644 (file)
@@ -541,7 +541,6 @@ void shutdown_netfront(struct netfront_dev *dev)
                 XenbusStateInitialising, err);
         goto close;
     }
-    err = NULL;
     state = xenbus_read_integer(path);
     while (err == NULL && (state < XenbusStateInitWait || state >= XenbusStateClosed))
         err = xenbus_wait_for_state_change(path, &state, &dev->events);
index e6a5f4e7bf3ef5ae4016aabd870cd019b31d1b88..df300b5a4ef14349f43e793f596809ba652427cd 100644 (file)
@@ -355,7 +355,6 @@ void shutdown_pcifront(struct pcifront_dev *dev)
                 XenbusStateInitialising, err);
         goto close_pcifront;
     }
-    err = NULL;
     state = xenbus_read_integer(path);
     while (err == NULL && (state < XenbusStateInitWait || state >= XenbusStateClosed))
         err = xenbus_wait_for_state_change(path, &state, &dev->events);