projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6b4fa6
)
pcmcia: include bad CIS filename in error message
author
Randy Dunlap
<randy.dunlap@oracle.com>
Tue, 5 Feb 2008 06:27:38 +0000
(22:27 -0800)
committer
Linus Torvalds
<torvalds@woody.linux-foundation.org>
Tue, 5 Feb 2008 17:44:08 +0000
(09:44 -0800)
- Print the invalid CIS filename in the invalid filename message.
- Use sizeof() instead of hard-coded constant for buffer size.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pcmcia/ds.c
patch
|
blob
|
history
diff --git
a/drivers/pcmcia/ds.c
b/drivers/pcmcia/ds.c
index 846468ce114410f8eeed340cedb79e4b04458c5f..5a85871f5ee919ff3bdb18f10be8715132b037de 100644
(file)
--- a/
drivers/pcmcia/ds.c
+++ b/
drivers/pcmcia/ds.c
@@
-865,11
+865,12
@@
static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
ds_dbg(1, "trying to load CIS file %s\n", filename);
if (strlen(filename) > 14) {
- printk(KERN_WARNING "pcmcia: CIS filename is too long\n");
+ printk(KERN_WARNING "pcmcia: CIS filename is too long [%s]\n",
+ filename);
return -EINVAL;
}
- snprintf(path,
20
, "%s", filename);
+ snprintf(path,
sizeof(path)
, "%s", filename);
if (request_firmware(&fw, path, &dev->dev) == 0) {
if (fw->size >= CISTPL_MAX_CIS_SIZE) {