diff options
Diffstat (limited to 'net/caif/cfdgml.c')
-rw-r--r-- | net/caif/cfdgml.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/caif/cfdgml.c b/net/caif/cfdgml.c index 0f5ff27aa41c..a63f4a5f5aff 100644 --- a/net/caif/cfdgml.c +++ b/net/caif/cfdgml.c | |||
@@ -86,12 +86,17 @@ static int cfdgml_transmit(struct cflayer *layr, struct cfpkt *pkt) | |||
86 | struct caif_payload_info *info; | 86 | struct caif_payload_info *info; |
87 | struct cfsrvl *service = container_obj(layr); | 87 | struct cfsrvl *service = container_obj(layr); |
88 | int ret; | 88 | int ret; |
89 | if (!cfsrvl_ready(service, &ret)) | 89 | |
90 | if (!cfsrvl_ready(service, &ret)) { | ||
91 | cfpkt_destroy(pkt); | ||
90 | return ret; | 92 | return ret; |
93 | } | ||
91 | 94 | ||
92 | /* STE Modem cannot handle more than 1500 bytes datagrams */ | 95 | /* STE Modem cannot handle more than 1500 bytes datagrams */ |
93 | if (cfpkt_getlen(pkt) > DGM_MTU) | 96 | if (cfpkt_getlen(pkt) > DGM_MTU) { |
97 | cfpkt_destroy(pkt); | ||
94 | return -EMSGSIZE; | 98 | return -EMSGSIZE; |
99 | } | ||
95 | 100 | ||
96 | cfpkt_add_head(pkt, &zero, 3); | 101 | cfpkt_add_head(pkt, &zero, 3); |
97 | packet_type = 0x08; /* B9 set - UNCLASSIFIED */ | 102 | packet_type = 0x08; /* B9 set - UNCLASSIFIED */ |