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
9b3087e9
Commit
9b3087e9
authored
Nov 01, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Plain Diff
Merge gregkh@kernel.bkbits.net:linux/usb-2.6
into kroah.com:/home/greg/linux/BK/usb-2.6
parents
f61aa42b
9502357c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
drivers/usb/serial/usb-serial.c
drivers/usb/serial/usb-serial.c
+4
-5
No files found.
drivers/usb/serial/usb-serial.c
View file @
9b3087e9
...
...
@@ -478,7 +478,7 @@ static int serial_open (struct tty_struct *tty, struct file * filp)
struct
usb_serial
*
serial
;
struct
usb_serial_port
*
port
;
unsigned
int
portNumber
;
int
retval
=
0
;
int
retval
=
-
ENODEV
;
dbg
(
"%s"
,
__FUNCTION__
);
...
...
@@ -487,10 +487,8 @@ static int serial_open (struct tty_struct *tty, struct file * filp)
/* get the serial object associated with this tty pointer */
serial
=
usb_serial_get_by_index
(
tty
->
index
);
if
(
!
serial
)
{
retval
=
-
ENODEV
;
if
(
!
serial
)
goto
bailout
;
}
/* set up our port structure making the tty driver remember our port object, and us it */
portNumber
=
tty
->
index
-
serial
->
minor
;
...
...
@@ -502,10 +500,11 @@ static int serial_open (struct tty_struct *tty, struct file * filp)
/* lock this module before we call it,
this may, which means we must bail out, safe because we are called with BKL held */
if
(
!
try_module_get
(
serial
->
type
->
owner
))
{
retval
=
-
ENODEV
;
kref_put
(
&
serial
->
kref
,
destroy_serial
)
;
goto
bailout
;
}
retval
=
0
;
++
port
->
open_count
;
if
(
port
->
open_count
==
1
)
{
/* only call the device specific open if this
...
...
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