diff options
Diffstat (limited to 'drivers/isdn/gigaset/i4l.c')
-rw-r--r-- | drivers/isdn/gigaset/i4l.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index 69a702f0db93..9b22f9cf2f33 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c | |||
@@ -544,11 +544,11 @@ int gigaset_register_to_LL(struct cardstate *cs, const char *isdnid) | |||
544 | 544 | ||
545 | gig_dbg(DEBUG_ANY, "Register driver capabilities to LL"); | 545 | gig_dbg(DEBUG_ANY, "Register driver capabilities to LL"); |
546 | 546 | ||
547 | //iif->id[sizeof(iif->id) - 1]=0; | ||
548 | //strncpy(iif->id, isdnid, sizeof(iif->id) - 1); | ||
549 | if (snprintf(iif->id, sizeof iif->id, "%s_%u", isdnid, cs->minor_index) | 547 | if (snprintf(iif->id, sizeof iif->id, "%s_%u", isdnid, cs->minor_index) |
550 | >= sizeof iif->id) | 548 | >= sizeof iif->id) { |
551 | return -ENOMEM; //FIXME EINVAL/...?? | 549 | pr_err("ID too long: %s\n", isdnid); |
550 | return 0; | ||
551 | } | ||
552 | 552 | ||
553 | iif->owner = THIS_MODULE; | 553 | iif->owner = THIS_MODULE; |
554 | iif->channels = cs->channels; | 554 | iif->channels = cs->channels; |
@@ -568,8 +568,10 @@ int gigaset_register_to_LL(struct cardstate *cs, const char *isdnid) | |||
568 | iif->rcvcallb_skb = NULL; /* Will be set by LL */ | 568 | iif->rcvcallb_skb = NULL; /* Will be set by LL */ |
569 | iif->statcallb = NULL; /* Will be set by LL */ | 569 | iif->statcallb = NULL; /* Will be set by LL */ |
570 | 570 | ||
571 | if (!register_isdn(iif)) | 571 | if (!register_isdn(iif)) { |
572 | pr_err("register_isdn failed\n"); | ||
572 | return 0; | 573 | return 0; |
574 | } | ||
573 | 575 | ||
574 | cs->myid = iif->channels; /* Set my device id */ | 576 | cs->myid = iif->channels; /* Set my device id */ |
575 | return 1; | 577 | return 1; |