Skip to contentSkip to conversation

pcmcia: fix uninitialized variable warning

PATCH New Harvey Harrison 1 participant 1 message Aug 20, 2008 Pcmcia

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pcmcia: fix uninitialized variable warning

drivers/pcmcia/pcmcia_resource.c: In function ‘pcmcia_map_mem_page’:
drivers/pcmcia/pcmcia_resource.c:255: warning: ‘s’ is used uninitialized in this function

---
 drivers/pcmcia/pcmcia_resource.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pcmcia/pcmcia_resource.c +1 -1
index 717a466..190b8bb 100644
@@ -251,11 +251,11 @@ int pcmcia_map_mem_page(window_handle_t win, memreq_t *req)
 	struct pcmcia_socket *s;
 	if ((win == NULL) || (win->magic != WINDOW_MAGIC))
 		return -EINVAL;
+	s = win->sock;
 	if (req->Page != 0) {
 		ds_dbg(s, 0, "failure: requested page is zero\n");
 		return -EINVAL;
 	}
-	s = win->sock;
 	win->ctl.card_start = req->CardOffset;
 	if (s->ops->set_mem_map(s, &win->ctl) != 0) {
 		ds_dbg(s, 0, "failed to set_mem_map\n");
Signature · 1 line
1.6.0.274.g8aacc