2008-08-20 00:23:54

by Harvey Harrison

[permalink] [raw]
Subject: [PATCH] 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

Signed-off-by: Harvey Harrison <[email protected]>
---
drivers/pcmcia/pcmcia_resource.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 717a466..190b8bb 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -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");
--
1.6.0.274.g8aacc