BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
3cd13e52
Commit
3cd13e52
authored
Feb 14, 2018
by
David Frey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't accept values < 0 in LED driver sysfs file
parent
e6b8e4ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
led.c
linux_kernel_modules/led/led.c
+2
-2
No files found.
linux_kernel_modules/led/led.c
View file @
3cd13e52
...
@@ -22,10 +22,10 @@ static int led_store(struct device *dev, struct device_attribute *attr,
...
@@ -22,10 +22,10 @@ static int led_store(struct device *dev, struct device_attribute *attr,
const
char
*
buf
,
size_t
count
)
const
char
*
buf
,
size_t
count
)
{
{
struct
led_device
*
led
=
dev_get_drvdata
(
dev
);
struct
led_device
*
led
=
dev_get_drvdata
(
dev
);
u
nsigned
int
val
;
u
8
val
;
int
ret
;
int
ret
;
ret
=
kstrto
int
(
buf
,
10
,
&
val
);
ret
=
kstrto
u8
(
buf
,
10
,
&
val
);
if
(
ret
||
val
>
1
)
if
(
ret
||
val
>
1
)
return
-
EINVAL
;
return
-
EINVAL
;
...
...
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