aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-04-28 05:14:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:33 -0400
commit8e44b29da5300f4698c41b5fd2d1ce52c28e2148 (patch)
tree88d4448cd3da9d71a4a6feb3863e8aa85e9c78fc /drivers/isdn/hardware
parent2f9e9b6db31d96fe4e8b519b8aab1ba172dd3ddf (diff)
avm: fix sparse warning using integer as NULL pointer
drivers/isdn/hardware/avm/b1isa.c:206:37: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1isa.c:208:33: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1.c:664:42: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1.c:666:44: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1.c:668:42: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1.c:791:37: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1.c:793:33: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1pci.c:385:37: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1pci.c:387:33: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1dma.c:886:42: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1dma.c:888:44: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1dma.c:890:42: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1dma.c:973:37: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1dma.c:975:33: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1pcmcia.c:204:37: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/b1pcmcia.c:206:33: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/t1isa.c:554:37: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/t1isa.c:556:33: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/t1pci.c:236:37: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/t1pci.c:238:33: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/c4.c:1091:42: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/c4.c:1093:44: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/c4.c:1095:42: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/c4.c:1170:21: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/c4.c:1294:37: warning: Using plain integer as NULL pointer drivers/isdn/hardware/avm/c4.c:1296:33: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Karsten Keil <kkeil@suse.de> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn/hardware')
-rw-r--r--drivers/isdn/hardware/avm/b1.c10
-rw-r--r--drivers/isdn/hardware/avm/b1dma.c10
-rw-r--r--drivers/isdn/hardware/avm/b1isa.c4
-rw-r--r--drivers/isdn/hardware/avm/b1pci.c4
-rw-r--r--drivers/isdn/hardware/avm/b1pcmcia.c4
-rw-r--r--drivers/isdn/hardware/avm/c4.c12
-rw-r--r--drivers/isdn/hardware/avm/t1isa.c4
-rw-r--r--drivers/isdn/hardware/avm/t1pci.c4
8 files changed, 26 insertions, 26 deletions
diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c
index 4484a641723..abf05ec3176 100644
--- a/drivers/isdn/hardware/avm/b1.c
+++ b/drivers/isdn/hardware/avm/b1.c
@@ -661,11 +661,11 @@ int b1ctl_read_proc(char *page, char **start, off_t off,
661 len += sprintf(page+len, "%-16s %s\n", "type", s); 661 len += sprintf(page+len, "%-16s %s\n", "type", s);
662 if (card->cardtype == avm_t1isa) 662 if (card->cardtype == avm_t1isa)
663 len += sprintf(page+len, "%-16s %d\n", "cardnr", card->cardnr); 663 len += sprintf(page+len, "%-16s %d\n", "cardnr", card->cardnr);
664 if ((s = cinfo->version[VER_DRIVER]) != 0) 664 if ((s = cinfo->version[VER_DRIVER]) != NULL)
665 len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); 665 len += sprintf(page+len, "%-16s %s\n", "ver_driver", s);
666 if ((s = cinfo->version[VER_CARDTYPE]) != 0) 666 if ((s = cinfo->version[VER_CARDTYPE]) != NULL)
667 len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); 667 len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s);
668 if ((s = cinfo->version[VER_SERIAL]) != 0) 668 if ((s = cinfo->version[VER_SERIAL]) != NULL)
669 len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); 669 len += sprintf(page+len, "%-16s %s\n", "ver_serial", s);
670 670
671 if (card->cardtype != avm_m1) { 671 if (card->cardtype != avm_m1) {
@@ -788,9 +788,9 @@ static int __init b1_init(void)
788 char *p; 788 char *p;
789 char rev[32]; 789 char rev[32];
790 790
791 if ((p = strchr(revision, ':')) != 0 && p[1]) { 791 if ((p = strchr(revision, ':')) != NULL && p[1]) {
792 strlcpy(rev, p + 2, 32); 792 strlcpy(rev, p + 2, 32);
793 if ((p = strchr(rev, '$')) != 0 && p > rev) 793 if ((p = strchr(rev, '$')) != NULL && p > rev)
794 *(p-1) = 0; 794 *(p-1) = 0;
795 } else 795 } else
796 strcpy(rev, "1.0"); 796 strcpy(rev, "1.0");
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c
index 669f6f67449..da34b98e3de 100644
--- a/drivers/isdn/hardware/avm/b1dma.c
+++ b/drivers/isdn/hardware/avm/b1dma.c
@@ -883,11 +883,11 @@ int b1dmactl_read_proc(char *page, char **start, off_t off,
883 default: s = "???"; break; 883 default: s = "???"; break;
884 } 884 }
885 len += sprintf(page+len, "%-16s %s\n", "type", s); 885 len += sprintf(page+len, "%-16s %s\n", "type", s);
886 if ((s = cinfo->version[VER_DRIVER]) != 0) 886 if ((s = cinfo->version[VER_DRIVER]) != NULL)
887 len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); 887 len += sprintf(page+len, "%-16s %s\n", "ver_driver", s);
888 if ((s = cinfo->version[VER_CARDTYPE]) != 0) 888 if ((s = cinfo->version[VER_CARDTYPE]) != NULL)
889 len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); 889 len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s);
890 if ((s = cinfo->version[VER_SERIAL]) != 0) 890 if ((s = cinfo->version[VER_SERIAL]) != NULL)
891 len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); 891 len += sprintf(page+len, "%-16s %s\n", "ver_serial", s);
892 892
893 if (card->cardtype != avm_m1) { 893 if (card->cardtype != avm_m1) {
@@ -970,9 +970,9 @@ static int __init b1dma_init(void)
970 char *p; 970 char *p;
971 char rev[32]; 971 char rev[32];
972 972
973 if ((p = strchr(revision, ':')) != 0 && p[1]) { 973 if ((p = strchr(revision, ':')) != NULL && p[1]) {
974 strlcpy(rev, p + 2, sizeof(rev)); 974 strlcpy(rev, p + 2, sizeof(rev));
975 if ((p = strchr(rev, '$')) != 0 && p > rev) 975 if ((p = strchr(rev, '$')) != NULL && p > rev)
976 *(p-1) = 0; 976 *(p-1) = 0;
977 } else 977 } else
978 strcpy(rev, "1.0"); 978 strcpy(rev, "1.0");
diff --git a/drivers/isdn/hardware/avm/b1isa.c b/drivers/isdn/hardware/avm/b1isa.c
index 80fb488848b..1e288eeb5e2 100644
--- a/drivers/isdn/hardware/avm/b1isa.c
+++ b/drivers/isdn/hardware/avm/b1isa.c
@@ -203,9 +203,9 @@ static int __init b1isa_init(void)
203 char rev[32]; 203 char rev[32];
204 int i; 204 int i;
205 205
206 if ((p = strchr(revision, ':')) != 0 && p[1]) { 206 if ((p = strchr(revision, ':')) != NULL && p[1]) {
207 strlcpy(rev, p + 2, 32); 207 strlcpy(rev, p + 2, 32);
208 if ((p = strchr(rev, '$')) != 0 && p > rev) 208 if ((p = strchr(rev, '$')) != NULL && p > rev)
209 *(p-1) = 0; 209 *(p-1) = 0;
210 } else 210 } else
211 strcpy(rev, "1.0"); 211 strcpy(rev, "1.0");
diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/isdn/hardware/avm/b1pci.c
index 90e2e6643d1..5b314a2c404 100644
--- a/drivers/isdn/hardware/avm/b1pci.c
+++ b/drivers/isdn/hardware/avm/b1pci.c
@@ -382,9 +382,9 @@ static int __init b1pci_init(void)
382 char rev[32]; 382 char rev[32];
383 int err; 383 int err;
384 384
385 if ((p = strchr(revision, ':')) != 0 && p[1]) { 385 if ((p = strchr(revision, ':')) != NULL && p[1]) {
386 strlcpy(rev, p + 2, 32); 386 strlcpy(rev, p + 2, 32);
387 if ((p = strchr(rev, '$')) != 0 && p > rev) 387 if ((p = strchr(rev, '$')) != NULL && p > rev)
388 *(p-1) = 0; 388 *(p-1) = 0;
389 } else 389 } else
390 strcpy(rev, "1.0"); 390 strcpy(rev, "1.0");
diff --git a/drivers/isdn/hardware/avm/b1pcmcia.c b/drivers/isdn/hardware/avm/b1pcmcia.c
index e479c0aef38..7740403b40e 100644
--- a/drivers/isdn/hardware/avm/b1pcmcia.c
+++ b/drivers/isdn/hardware/avm/b1pcmcia.c
@@ -201,9 +201,9 @@ static int __init b1pcmcia_init(void)
201 char *p; 201 char *p;
202 char rev[32]; 202 char rev[32];
203 203
204 if ((p = strchr(revision, ':')) != 0 && p[1]) { 204 if ((p = strchr(revision, ':')) != NULL && p[1]) {
205 strlcpy(rev, p + 2, 32); 205 strlcpy(rev, p + 2, 32);
206 if ((p = strchr(rev, '$')) != 0 && p > rev) 206 if ((p = strchr(rev, '$')) != NULL && p > rev)
207 *(p-1) = 0; 207 *(p-1) = 0;
208 } else 208 } else
209 strcpy(rev, "1.0"); 209 strcpy(rev, "1.0");
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c
index 4bbbbe68807..9df1d3f66c8 100644
--- a/drivers/isdn/hardware/avm/c4.c
+++ b/drivers/isdn/hardware/avm/c4.c
@@ -1088,11 +1088,11 @@ static int c4_read_proc(char *page, char **start, off_t off,
1088 default: s = "???"; break; 1088 default: s = "???"; break;
1089 } 1089 }
1090 len += sprintf(page+len, "%-16s %s\n", "type", s); 1090 len += sprintf(page+len, "%-16s %s\n", "type", s);
1091 if ((s = cinfo->version[VER_DRIVER]) != 0) 1091 if ((s = cinfo->version[VER_DRIVER]) != NULL)
1092 len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); 1092 len += sprintf(page+len, "%-16s %s\n", "ver_driver", s);
1093 if ((s = cinfo->version[VER_CARDTYPE]) != 0) 1093 if ((s = cinfo->version[VER_CARDTYPE]) != NULL)
1094 len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); 1094 len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s);
1095 if ((s = cinfo->version[VER_SERIAL]) != 0) 1095 if ((s = cinfo->version[VER_SERIAL]) != NULL)
1096 len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); 1096 len += sprintf(page+len, "%-16s %s\n", "ver_serial", s);
1097 1097
1098 if (card->cardtype != avm_m1) { 1098 if (card->cardtype != avm_m1) {
@@ -1167,7 +1167,7 @@ static int c4_add_card(struct capicardparams *p, struct pci_dev *dev,
1167 } 1167 }
1168 1168
1169 card->mbase = ioremap(card->membase, 128); 1169 card->mbase = ioremap(card->membase, 128);
1170 if (card->mbase == 0) { 1170 if (card->mbase == NULL) {
1171 printk(KERN_NOTICE "c4: can't remap memory at 0x%lx\n", 1171 printk(KERN_NOTICE "c4: can't remap memory at 0x%lx\n",
1172 card->membase); 1172 card->membase);
1173 retval = -EIO; 1173 retval = -EIO;
@@ -1291,9 +1291,9 @@ static int __init c4_init(void)
1291 char rev[32]; 1291 char rev[32];
1292 int err; 1292 int err;
1293 1293
1294 if ((p = strchr(revision, ':')) != 0 && p[1]) { 1294 if ((p = strchr(revision, ':')) != NULL && p[1]) {
1295 strlcpy(rev, p + 2, 32); 1295 strlcpy(rev, p + 2, 32);
1296 if ((p = strchr(rev, '$')) != 0 && p > rev) 1296 if ((p = strchr(rev, '$')) != NULL && p > rev)
1297 *(p-1) = 0; 1297 *(p-1) = 0;
1298 } else 1298 } else
1299 strcpy(rev, "1.0"); 1299 strcpy(rev, "1.0");
diff --git a/drivers/isdn/hardware/avm/t1isa.c b/drivers/isdn/hardware/avm/t1isa.c
index 6130724e46e..e7724493738 100644
--- a/drivers/isdn/hardware/avm/t1isa.c
+++ b/drivers/isdn/hardware/avm/t1isa.c
@@ -551,9 +551,9 @@ static int __init t1isa_init(void)
551 char *p; 551 char *p;
552 int i; 552 int i;
553 553
554 if ((p = strchr(revision, ':')) != 0 && p[1]) { 554 if ((p = strchr(revision, ':')) != NULL && p[1]) {
555 strlcpy(rev, p + 2, 32); 555 strlcpy(rev, p + 2, 32);
556 if ((p = strchr(rev, '$')) != 0 && p > rev) 556 if ((p = strchr(rev, '$')) != NULL && p > rev)
557 *(p-1) = 0; 557 *(p-1) = 0;
558 } else 558 } else
559 strcpy(rev, "1.0"); 559 strcpy(rev, "1.0");
diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/isdn/hardware/avm/t1pci.c
index d1e253c94db..e6d298d7514 100644
--- a/drivers/isdn/hardware/avm/t1pci.c
+++ b/drivers/isdn/hardware/avm/t1pci.c
@@ -233,9 +233,9 @@ static int __init t1pci_init(void)
233 char rev[32]; 233 char rev[32];
234 int err; 234 int err;
235 235
236 if ((p = strchr(revision, ':')) != 0 && p[1]) { 236 if ((p = strchr(revision, ':')) != NULL && p[1]) {
237 strlcpy(rev, p + 2, 32); 237 strlcpy(rev, p + 2, 32);
238 if ((p = strchr(rev, '$')) != 0 && p > rev) 238 if ((p = strchr(rev, '$')) != NULL && p > rev)
239 *(p-1) = 0; 239 *(p-1) = 0;
240 } else 240 } else
241 strcpy(rev, "1.0"); 241 strcpy(rev, "1.0");