aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-04-28 05:14:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:33 -0400
commit2f9e9b6db31d96fe4e8b519b8aab1ba172dd3ddf (patch)
tree37a266621d7434479b359c1417a871e54289e173 /drivers
parent50f8c370e77befe9121720bd7bdada2ac0d13915 (diff)
capi: fix sparse warnings using integer as NULL pointer
drivers/isdn/capi/kcapi.c:829:30: warning: Using plain integer as NULL pointer drivers/isdn/capi/kcapi.c:838:27: warning: Using plain integer as NULL pointer drivers/isdn/capi/kcapi.c:954:17: warning: Using plain integer as NULL pointer drivers/isdn/capi/kcapi.c:1007:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/kcapi.c:1009:33: warning: Using plain integer as NULL pointer drivers/isdn/capi/capiutil.c:453:24: warning: Using plain integer as NULL pointer drivers/isdn/capi/capilib.c:47:30: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:353:29: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:369:15: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:486:48: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:515:46: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:541:47: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:692:47: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:699:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:704:14: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:943:53: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:948:32: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:969:42: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:989:48: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:1026:69: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:1028:19: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:1061:20: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:1529:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/capi.c:1531:33: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:338:15: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:758:32: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:880:40: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:407:15: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:407:15: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:444:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:429:49: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:1664:61: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:1969:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:2294:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:2297:33: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:2338:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/capidrv.c:2341:33: warning: Using plain integer as NULL pointer drivers/isdn/capi/capifs.c:192:37: warning: Using plain integer as NULL pointer drivers/isdn/capi/capifs.c:194: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')
-rw-r--r--drivers/isdn/capi/capi.c34
-rw-r--r--drivers/isdn/capi/capidrv.c24
-rw-r--r--drivers/isdn/capi/capifs.c4
-rw-r--r--drivers/isdn/capi/capilib.c2
-rw-r--r--drivers/isdn/capi/capiutil.c2
-rw-r--r--drivers/isdn/capi/kcapi.c10
6 files changed, 38 insertions, 38 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 23ae66c76d47..24c6b7ca62be 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -350,7 +350,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci)
350 if (ncci == 0xffffffff || np->ncci == ncci) { 350 if (ncci == 0xffffffff || np->ncci == ncci) {
351 *pp = (*pp)->next; 351 *pp = (*pp)->next;
352#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE 352#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
353 if ((mp = np->minorp) != 0) { 353 if ((mp = np->minorp) != NULL) {
354#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE) 354#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
355 capifs_free_ncci(mp->minor); 355 capifs_free_ncci(mp->minor);
356#endif 356#endif
@@ -366,7 +366,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci)
366 } 366 }
367#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ 367#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
368 kfree(np); 368 kfree(np);
369 if (*pp == 0) return; 369 if (*pp == NULL) return;
370 } else { 370 } else {
371 pp = &(*pp)->next; 371 pp = &(*pp)->next;
372 } 372 }
@@ -483,7 +483,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
483#endif 483#endif
484 goto bad; 484 goto bad;
485 } 485 }
486 if ((nskb = gen_data_b3_resp_for(mp, skb)) == 0) { 486 if ((nskb = gen_data_b3_resp_for(mp, skb)) == NULL) {
487 printk(KERN_ERR "capi: gen_data_b3_resp failed\n"); 487 printk(KERN_ERR "capi: gen_data_b3_resp failed\n");
488 goto bad; 488 goto bad;
489 } 489 }
@@ -512,7 +512,7 @@ bad:
512static void handle_minor_recv(struct capiminor *mp) 512static void handle_minor_recv(struct capiminor *mp)
513{ 513{
514 struct sk_buff *skb; 514 struct sk_buff *skb;
515 while ((skb = skb_dequeue(&mp->inqueue)) != 0) { 515 while ((skb = skb_dequeue(&mp->inqueue)) != NULL) {
516 unsigned int len = skb->len; 516 unsigned int len = skb->len;
517 mp->inbytes -= len; 517 mp->inbytes -= len;
518 if (handle_recv_skb(mp, skb) < 0) { 518 if (handle_recv_skb(mp, skb) < 0) {
@@ -538,7 +538,7 @@ static int handle_minor_send(struct capiminor *mp)
538 return 0; 538 return 0;
539 } 539 }
540 540
541 while ((skb = skb_dequeue(&mp->outqueue)) != 0) { 541 while ((skb = skb_dequeue(&mp->outqueue)) != NULL) {
542 datahandle = mp->datahandle; 542 datahandle = mp->datahandle;
543 len = (u16)skb->len; 543 len = (u16)skb->len;
544 skb_push(skb, CAPI_DATA_B3_REQ_LEN); 544 skb_push(skb, CAPI_DATA_B3_REQ_LEN);
@@ -689,19 +689,19 @@ capi_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
689 if (!cdev->ap.applid) 689 if (!cdev->ap.applid)
690 return -ENODEV; 690 return -ENODEV;
691 691
692 if ((skb = skb_dequeue(&cdev->recvqueue)) == 0) { 692 if ((skb = skb_dequeue(&cdev->recvqueue)) == NULL) {
693 693
694 if (file->f_flags & O_NONBLOCK) 694 if (file->f_flags & O_NONBLOCK)
695 return -EAGAIN; 695 return -EAGAIN;
696 696
697 for (;;) { 697 for (;;) {
698 interruptible_sleep_on(&cdev->recvwait); 698 interruptible_sleep_on(&cdev->recvwait);
699 if ((skb = skb_dequeue(&cdev->recvqueue)) != 0) 699 if ((skb = skb_dequeue(&cdev->recvqueue)) != NULL)
700 break; 700 break;
701 if (signal_pending(current)) 701 if (signal_pending(current))
702 break; 702 break;
703 } 703 }
704 if (skb == 0) 704 if (skb == NULL)
705 return -ERESTARTNOHAND; 705 return -ERESTARTNOHAND;
706 } 706 }
707 if (skb->len > count) { 707 if (skb->len > count) {
@@ -940,12 +940,12 @@ capi_ioctl(struct inode *inode, struct file *file,
940 return -EFAULT; 940 return -EFAULT;
941 941
942 mutex_lock(&cdev->ncci_list_mtx); 942 mutex_lock(&cdev->ncci_list_mtx);
943 if ((nccip = capincci_find(cdev, (u32) ncci)) == 0) { 943 if ((nccip = capincci_find(cdev, (u32) ncci)) == NULL) {
944 mutex_unlock(&cdev->ncci_list_mtx); 944 mutex_unlock(&cdev->ncci_list_mtx);
945 return 0; 945 return 0;
946 } 946 }
947#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE 947#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
948 if ((mp = nccip->minorp) != 0) { 948 if ((mp = nccip->minorp) != NULL) {
949 count += atomic_read(&mp->ttyopencount); 949 count += atomic_read(&mp->ttyopencount);
950 } 950 }
951#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ 951#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
@@ -966,7 +966,7 @@ capi_ioctl(struct inode *inode, struct file *file,
966 return -EFAULT; 966 return -EFAULT;
967 mutex_lock(&cdev->ncci_list_mtx); 967 mutex_lock(&cdev->ncci_list_mtx);
968 nccip = capincci_find(cdev, (u32) ncci); 968 nccip = capincci_find(cdev, (u32) ncci);
969 if (!nccip || (mp = nccip->minorp) == 0) { 969 if (!nccip || (mp = nccip->minorp) == NULL) {
970 mutex_unlock(&cdev->ncci_list_mtx); 970 mutex_unlock(&cdev->ncci_list_mtx);
971 return -ESRCH; 971 return -ESRCH;
972 } 972 }
@@ -986,7 +986,7 @@ capi_open(struct inode *inode, struct file *file)
986 if (file->private_data) 986 if (file->private_data)
987 return -EEXIST; 987 return -EEXIST;
988 988
989 if ((file->private_data = capidev_alloc()) == 0) 989 if ((file->private_data = capidev_alloc()) == NULL)
990 return -ENOMEM; 990 return -ENOMEM;
991 991
992 return nonseekable_open(inode, file); 992 return nonseekable_open(inode, file);
@@ -1023,9 +1023,9 @@ static int capinc_tty_open(struct tty_struct * tty, struct file * file)
1023 struct capiminor *mp; 1023 struct capiminor *mp;
1024 unsigned long flags; 1024 unsigned long flags;
1025 1025
1026 if ((mp = capiminor_find(iminor(file->f_path.dentry->d_inode))) == 0) 1026 if ((mp = capiminor_find(iminor(file->f_path.dentry->d_inode))) == NULL)
1027 return -ENXIO; 1027 return -ENXIO;
1028 if (mp->nccip == 0) 1028 if (mp->nccip == NULL)
1029 return -ENXIO; 1029 return -ENXIO;
1030 1030
1031 tty->driver_data = (void *)mp; 1031 tty->driver_data = (void *)mp;
@@ -1058,7 +1058,7 @@ static void capinc_tty_close(struct tty_struct * tty, struct file * file)
1058#ifdef _DEBUG_REFCOUNT 1058#ifdef _DEBUG_REFCOUNT
1059 printk(KERN_DEBUG "capinc_tty_close ocount=%d\n", atomic_read(&mp->ttyopencount)); 1059 printk(KERN_DEBUG "capinc_tty_close ocount=%d\n", atomic_read(&mp->ttyopencount));
1060#endif 1060#endif
1061 if (mp->nccip == 0) 1061 if (mp->nccip == NULL)
1062 capiminor_free(mp); 1062 capiminor_free(mp);
1063 } 1063 }
1064 1064
@@ -1526,9 +1526,9 @@ static int __init capi_init(void)
1526 char *compileinfo; 1526 char *compileinfo;
1527 int major_ret; 1527 int major_ret;
1528 1528
1529 if ((p = strchr(revision, ':')) != 0 && p[1]) { 1529 if ((p = strchr(revision, ':')) != NULL && p[1]) {
1530 strlcpy(rev, p + 2, sizeof(rev)); 1530 strlcpy(rev, p + 2, sizeof(rev));
1531 if ((p = strchr(rev, '$')) != 0 && p > rev) 1531 if ((p = strchr(rev, '$')) != NULL && p > rev)
1532 *(p-1) = 0; 1532 *(p-1) = 0;
1533 } else 1533 } else
1534 strcpy(rev, "1.0"); 1534 strcpy(rev, "1.0");
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c
index cb42b690b45e..2e602dd07ffa 100644
--- a/drivers/isdn/capi/capidrv.c
+++ b/drivers/isdn/capi/capidrv.c
@@ -335,7 +335,7 @@ static capidrv_plci *new_plci(capidrv_contr * card, int chan)
335 335
336 plcip = kzalloc(sizeof(capidrv_plci), GFP_ATOMIC); 336 plcip = kzalloc(sizeof(capidrv_plci), GFP_ATOMIC);
337 337
338 if (plcip == 0) 338 if (plcip == NULL)
339 return NULL; 339 return NULL;
340 340
341 plcip->state = ST_PLCI_NONE; 341 plcip->state = ST_PLCI_NONE;
@@ -404,7 +404,7 @@ static inline capidrv_ncci *new_ncci(capidrv_contr * card,
404 404
405 nccip = kzalloc(sizeof(capidrv_ncci), GFP_ATOMIC); 405 nccip = kzalloc(sizeof(capidrv_ncci), GFP_ATOMIC);
406 406
407 if (nccip == 0) 407 if (nccip == NULL)
408 return NULL; 408 return NULL;
409 409
410 nccip->ncci = ncci; 410 nccip->ncci = ncci;
@@ -426,7 +426,7 @@ static inline capidrv_ncci *find_ncci(capidrv_contr * card, u32 ncci)
426 capidrv_plci *plcip; 426 capidrv_plci *plcip;
427 capidrv_ncci *p; 427 capidrv_ncci *p;
428 428
429 if ((plcip = find_plci_by_ncci(card, ncci)) == 0) 429 if ((plcip = find_plci_by_ncci(card, ncci)) == NULL)
430 return NULL; 430 return NULL;
431 431
432 for (p = plcip->ncci_list; p; p = p->next) 432 for (p = plcip->ncci_list; p; p = p->next)
@@ -441,7 +441,7 @@ static inline capidrv_ncci *find_ncci_by_msgid(capidrv_contr * card,
441 capidrv_plci *plcip; 441 capidrv_plci *plcip;
442 capidrv_ncci *p; 442 capidrv_ncci *p;
443 443
444 if ((plcip = find_plci_by_ncci(card, ncci)) == 0) 444 if ((plcip = find_plci_by_ncci(card, ncci)) == NULL)
445 return NULL; 445 return NULL;
446 446
447 for (p = plcip->ncci_list; p; p = p->next) 447 for (p = plcip->ncci_list; p; p = p->next)
@@ -755,7 +755,7 @@ static inline int new_bchan(capidrv_contr * card)
755{ 755{
756 int i; 756 int i;
757 for (i = 0; i < card->nbchan; i++) { 757 for (i = 0; i < card->nbchan; i++) {
758 if (card->bchans[i].plcip == 0) { 758 if (card->bchans[i].plcip == NULL) {
759 card->bchans[i].disconnecting = 0; 759 card->bchans[i].disconnecting = 0;
760 return i; 760 return i;
761 } 761 }
@@ -877,7 +877,7 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg)
877 return; 877 return;
878 } 878 }
879 bchan = &card->bchans[chan]; 879 bchan = &card->bchans[chan];
880 if ((plcip = new_plci(card, chan)) == 0) { 880 if ((plcip = new_plci(card, chan)) == NULL) {
881 printk(KERN_ERR "capidrv-%d: incoming call: no memory, sorry.\n", card->contrnr); 881 printk(KERN_ERR "capidrv-%d: incoming call: no memory, sorry.\n", card->contrnr);
882 return; 882 return;
883 } 883 }
@@ -1661,7 +1661,7 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card)
1661 NULL, /* Useruserdata */ 1661 NULL, /* Useruserdata */
1662 NULL /* Facilitydataarray */ 1662 NULL /* Facilitydataarray */
1663 ); 1663 );
1664 if ((plcip = new_plci(card, (c->arg % card->nbchan))) == 0) { 1664 if ((plcip = new_plci(card, (c->arg % card->nbchan))) == NULL) {
1665 cmd.command = ISDN_STAT_DHUP; 1665 cmd.command = ISDN_STAT_DHUP;
1666 cmd.driver = card->myid; 1666 cmd.driver = card->myid;
1667 cmd.arg = (c->arg % card->nbchan); 1667 cmd.arg = (c->arg % card->nbchan);
@@ -1966,7 +1966,7 @@ static void enable_dchannel_trace(capidrv_contr *card)
1966 card->name, errcode); 1966 card->name, errcode);
1967 return; 1967 return;
1968 } 1968 }
1969 if (strstr(manufacturer, "AVM") == 0) { 1969 if (strstr(manufacturer, "AVM") == NULL) {
1970 printk(KERN_ERR "%s: not from AVM, no d-channel trace possible (%s)\n", 1970 printk(KERN_ERR "%s: not from AVM, no d-channel trace possible (%s)\n",
1971 card->name, manufacturer); 1971 card->name, manufacturer);
1972 return; 1972 return;
@@ -2291,10 +2291,10 @@ static int __init capidrv_init(void)
2291 u32 ncontr, contr; 2291 u32 ncontr, contr;
2292 u16 errcode; 2292 u16 errcode;
2293 2293
2294 if ((p = strchr(revision, ':')) != 0 && p[1]) { 2294 if ((p = strchr(revision, ':')) != NULL && p[1]) {
2295 strncpy(rev, p + 2, sizeof(rev)); 2295 strncpy(rev, p + 2, sizeof(rev));
2296 rev[sizeof(rev)-1] = 0; 2296 rev[sizeof(rev)-1] = 0;
2297 if ((p = strchr(rev, '$')) != 0 && p > rev) 2297 if ((p = strchr(rev, '$')) != NULL && p > rev)
2298 *(p-1) = 0; 2298 *(p-1) = 0;
2299 } else 2299 } else
2300 strcpy(rev, "1.0"); 2300 strcpy(rev, "1.0");
@@ -2335,10 +2335,10 @@ static void __exit capidrv_exit(void)
2335 char rev[32]; 2335 char rev[32];
2336 char *p; 2336 char *p;
2337 2337
2338 if ((p = strchr(revision, ':')) != 0) { 2338 if ((p = strchr(revision, ':')) != NULL) {
2339 strncpy(rev, p + 1, sizeof(rev)); 2339 strncpy(rev, p + 1, sizeof(rev));
2340 rev[sizeof(rev)-1] = 0; 2340 rev[sizeof(rev)-1] = 0;
2341 if ((p = strchr(rev, '$')) != 0) 2341 if ((p = strchr(rev, '$')) != NULL)
2342 *p = 0; 2342 *p = 0;
2343 } else { 2343 } else {
2344 strcpy(rev, " ??? "); 2344 strcpy(rev, " ??? ");
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c
index 6d7c47ec0367..eafe0e9daa7c 100644
--- a/drivers/isdn/capi/capifs.c
+++ b/drivers/isdn/capi/capifs.c
@@ -189,9 +189,9 @@ static int __init capifs_init(void)
189 char *p; 189 char *p;
190 int err; 190 int err;
191 191
192 if ((p = strchr(revision, ':')) != 0 && p[1]) { 192 if ((p = strchr(revision, ':')) != NULL && p[1]) {
193 strlcpy(rev, p + 2, sizeof(rev)); 193 strlcpy(rev, p + 2, sizeof(rev));
194 if ((p = strchr(rev, '$')) != 0 && p > rev) 194 if ((p = strchr(rev, '$')) != NULL && p > rev)
195 *(p-1) = 0; 195 *(p-1) = 0;
196 } else 196 } else
197 strcpy(rev, "1.0"); 197 strcpy(rev, "1.0");
diff --git a/drivers/isdn/capi/capilib.c b/drivers/isdn/capi/capilib.c
index 68409d971e73..34d8be2761c1 100644
--- a/drivers/isdn/capi/capilib.c
+++ b/drivers/isdn/capi/capilib.c
@@ -44,7 +44,7 @@ static inline void mq_init(struct capilib_ncci * np)
44static inline int mq_enqueue(struct capilib_ncci * np, u16 msgid) 44static inline int mq_enqueue(struct capilib_ncci * np, u16 msgid)
45{ 45{
46 struct capilib_msgidqueue *mq; 46 struct capilib_msgidqueue *mq;
47 if ((mq = np->msgidfree) == 0) 47 if ((mq = np->msgidfree) == NULL)
48 return 0; 48 return 0;
49 np->msgidfree = mq->next; 49 np->msgidfree = mq->next;
50 mq->msgid = msgid; 50 mq->msgid = msgid;
diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c
index 22379b94e88f..ebef4ce1b00c 100644
--- a/drivers/isdn/capi/capiutil.c
+++ b/drivers/isdn/capi/capiutil.c
@@ -450,7 +450,7 @@ static void pars_2_message(_cmsg * cmsg)
450 cmsg->l += 4; 450 cmsg->l += 4;
451 break; 451 break;
452 case _CSTRUCT: 452 case _CSTRUCT:
453 if (*(u8 **) OFF == 0) { 453 if (*(u8 **) OFF == NULL) {
454 *(cmsg->m + cmsg->l) = '\0'; 454 *(cmsg->m + cmsg->l) = '\0';
455 cmsg->l++; 455 cmsg->l++;
456 } else if (**(_cstruct *) OFF != 0xff) { 456 } else if (**(_cstruct *) OFF != 0xff) {
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c
index f55531869313..ef6de217b9fc 100644
--- a/drivers/isdn/capi/kcapi.c
+++ b/drivers/isdn/capi/kcapi.c
@@ -826,7 +826,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data)
826 card = capi_ctr_get(card); 826 card = capi_ctr_get(card);
827 if (!card) 827 if (!card)
828 return -ESRCH; 828 return -ESRCH;
829 if (card->load_firmware == 0) { 829 if (card->load_firmware == NULL) {
830 printk(KERN_DEBUG "kcapi: load: no load function\n"); 830 printk(KERN_DEBUG "kcapi: load: no load function\n");
831 return -ESRCH; 831 return -ESRCH;
832 } 832 }
@@ -835,7 +835,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data)
835 printk(KERN_DEBUG "kcapi: load: invalid parameter: length of t4file is %d ?\n", ldef.t4file.len); 835 printk(KERN_DEBUG "kcapi: load: invalid parameter: length of t4file is %d ?\n", ldef.t4file.len);
836 return -EINVAL; 836 return -EINVAL;
837 } 837 }
838 if (ldef.t4file.data == 0) { 838 if (ldef.t4file.data == NULL) {
839 printk(KERN_DEBUG "kcapi: load: invalid parameter: dataptr is 0\n"); 839 printk(KERN_DEBUG "kcapi: load: invalid parameter: dataptr is 0\n");
840 return -EINVAL; 840 return -EINVAL;
841 } 841 }
@@ -951,7 +951,7 @@ int capi20_manufacturer(unsigned int cmd, void __user *data)
951 if (strcmp(driver->name, cdef.driver) == 0) 951 if (strcmp(driver->name, cdef.driver) == 0)
952 break; 952 break;
953 } 953 }
954 if (driver == 0) { 954 if (driver == NULL) {
955 printk(KERN_ERR "kcapi: driver \"%s\" not loaded.\n", 955 printk(KERN_ERR "kcapi: driver \"%s\" not loaded.\n",
956 cdef.driver); 956 cdef.driver);
957 return -ESRCH; 957 return -ESRCH;
@@ -1004,9 +1004,9 @@ static int __init kcapi_init(void)
1004 return ret; 1004 return ret;
1005 kcapi_proc_init(); 1005 kcapi_proc_init();
1006 1006
1007 if ((p = strchr(revision, ':')) != 0 && p[1]) { 1007 if ((p = strchr(revision, ':')) != NULL && p[1]) {
1008 strlcpy(rev, p + 2, sizeof(rev)); 1008 strlcpy(rev, p + 2, sizeof(rev));
1009 if ((p = strchr(rev, '$')) != 0 && p > rev) 1009 if ((p = strchr(rev, '$')) != NULL && p > rev)
1010 *(p-1) = 0; 1010 *(p-1) = 0;
1011 } else 1011 } else
1012 strcpy(rev, "1.0"); 1012 strcpy(rev, "1.0");