Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
fb31074a
Commit
fb31074a
authored
May 20, 2003
by
Duncan Sands
Committed by
Greg Kroah-Hartman
May 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB speedtouch: remove useless NULL pointer checks
The stats field is never NULL.
parent
7748fd33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
drivers/usb/misc/speedtch.c
drivers/usb/misc/speedtch.c
+4
-8
No files found.
drivers/usb/misc/speedtch.c
View file @
fb31074a
...
@@ -358,8 +358,7 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
...
@@ -358,8 +358,7 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
/* is skb long enough ? */
/* is skb long enough ? */
if
(
skb
->
len
<
pdu_length
)
{
if
(
skb
->
len
<
pdu_length
)
{
if
(
ctx
->
vcc
->
stats
)
atomic_inc
(
&
ctx
->
vcc
->
stats
->
rx_err
);
atomic_inc
(
&
ctx
->
vcc
->
stats
->
rx_err
);
return
NULL
;
return
NULL
;
}
}
...
@@ -378,8 +377,7 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
...
@@ -378,8 +377,7 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
/* check crc */
/* check crc */
if
(
pdu_crc
!=
crc
)
{
if
(
pdu_crc
!=
crc
)
{
dbg
(
"udsl_decode_aal5: crc check failed!"
);
dbg
(
"udsl_decode_aal5: crc check failed!"
);
if
(
ctx
->
vcc
->
stats
)
atomic_inc
(
&
ctx
->
vcc
->
stats
->
rx_err
);
atomic_inc
(
&
ctx
->
vcc
->
stats
->
rx_err
);
return
NULL
;
return
NULL
;
}
}
...
@@ -387,8 +385,7 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
...
@@ -387,8 +385,7 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
skb_trim
(
skb
,
length
);
skb_trim
(
skb
,
length
);
/* update stats */
/* update stats */
if
(
ctx
->
vcc
->
stats
)
atomic_inc
(
&
ctx
->
vcc
->
stats
->
rx
);
atomic_inc
(
&
ctx
->
vcc
->
stats
->
rx
);
vdbg
(
"udsl_decode_aal5 returns pdu 0x%p with length %d"
,
skb
,
skb
->
len
);
vdbg
(
"udsl_decode_aal5 returns pdu 0x%p with length %d"
,
skb
,
skb
->
len
);
return
skb
;
return
skb
;
...
@@ -760,8 +757,7 @@ static void udsl_process_send (unsigned long data)
...
@@ -760,8 +757,7 @@ static void udsl_process_send (unsigned long data)
dev_kfree_skb
(
skb
);
dev_kfree_skb
(
skb
);
instance
->
current_skb
=
NULL
;
instance
->
current_skb
=
NULL
;
if
(
vcc
->
stats
)
atomic_inc
(
&
vcc
->
stats
->
tx
);
atomic_inc
(
&
vcc
->
stats
->
tx
);
}
}
goto
made_progress
;
goto
made_progress
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment