Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
6b50d8b8
Commit
6b50d8b8
authored
Aug 05, 2006
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: elo - handle input_register_device() failures
Signed-off-by:
Dmitry Torokhov
<
dtor@mail.ru
>
parent
f287caee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
drivers/input/touchscreen/elo.c
drivers/input/touchscreen/elo.c
+12
-6
No files found.
drivers/input/touchscreen/elo.c
View file @
6b50d8b8
...
...
@@ -187,11 +187,13 @@ static irqreturn_t elo_interrupt(struct serio *serio,
static
void
elo_disconnect
(
struct
serio
*
serio
)
{
struct
elo
*
elo
=
serio_get_drvdata
(
serio
);
struct
elo
*
elo
=
serio_get_drvdata
(
serio
);
input_get_device
(
elo
->
dev
);
input_unregister_device
(
elo
->
dev
);
serio_close
(
serio
);
serio_set_drvdata
(
serio
,
NULL
);
input_put_device
(
elo
->
dev
);
kfree
(
elo
);
}
...
...
@@ -211,7 +213,7 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv)
input_dev
=
input_allocate_device
();
if
(
!
elo
||
!
input_dev
)
{
err
=
-
ENOMEM
;
goto
fail
;
goto
fail
1
;
}
elo
->
serio
=
serio
;
...
...
@@ -257,13 +259,17 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv)
err
=
serio_open
(
serio
,
drv
);
if
(
err
)
goto
fail
;
goto
fail2
;
err
=
input_register_device
(
elo
->
dev
);
if
(
err
)
goto
fail3
;
input_register_device
(
elo
->
dev
);
return
0
;
fail:
serio_set_drvdata
(
serio
,
NULL
);
input_free_device
(
input_dev
);
fail3:
serio_close
(
serio
);
fail2:
serio_set_drvdata
(
serio
,
NULL
);
fail1:
input_free_device
(
input_dev
);
kfree
(
elo
);
return
err
;
}
...
...
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