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
a6cdb349
Commit
a6cdb349
authored
Sep 30, 2014
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
greybus: es1: no BUG_ON() code, report an error and recover.
parent
1cfc667d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
drivers/staging/greybus/es1-ap-usb.c
drivers/staging/greybus/es1-ap-usb.c
+7
-1
No files found.
drivers/staging/greybus/es1-ap-usb.c
View file @
a6cdb349
...
...
@@ -116,7 +116,13 @@ static int alloc_gbuf_data(struct gbuf *gbuf, unsigned int size, gfp_t gfp_mask)
* we will encode the cport number in the first byte of the buffer, so
* set the second byte to be the "transfer buffer"
*/
BUG_ON
(
gbuf
->
cport_id
>
(
u16
)
U8_MAX
);
if
(
gbuf
->
cport_id
>
(
u16
)
U8_MAX
)
{
pr_err
(
"gbuf->cport_id is '%d' and is out of range!
\n
"
,
gbuf
->
cport_id
);
kfree
(
buffer
);
return
-
EINVAL
;
}
buffer
[
0
]
=
gbuf
->
cport_id
;
gbuf
->
transfer_buffer
=
&
buffer
[
1
];
gbuf
->
transfer_buffer_length
=
size
;
...
...
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