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
nexedi
linux
Commits
2aea7c00
Commit
2aea7c00
authored
May 20, 2003
by
Duncan Sands
Committed by
Linus Torvalds
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
3dfedcfe
Changes
1
Show 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 @
2aea7c00
...
@@ -366,7 +366,6 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
...
@@ -366,7 +366,6 @@ 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
;
}
}
...
@@ -386,7 +385,6 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
...
@@ -386,7 +385,6 @@ 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
;
}
}
...
@@ -395,7 +393,6 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
...
@@ -395,7 +393,6 @@ 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
);
dbg
(
"udsl_decode_aal5 returns pdu 0x%p with length %d"
,
skb
,
skb
->
len
);
dbg
(
"udsl_decode_aal5 returns pdu 0x%p with length %d"
,
skb
,
skb
->
len
);
...
@@ -778,7 +775,6 @@ static void udsl_process_send (unsigned long data)
...
@@ -778,7 +775,6 @@ static void udsl_process_send (unsigned long data)
kfree_skb
(
skb
);
kfree_skb
(
skb
);
instance
->
current_skb
=
NULL
;
instance
->
current_skb
=
NULL
;
if
(
vcc
->
stats
)
atomic_inc
(
&
vcc
->
stats
->
tx
);
atomic_inc
(
&
vcc
->
stats
->
tx
);
}
}
...
...
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