projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
834d867
)
Staging: dgnc: Fix checking return value of register_chrdev
author
Salah Triki
<salah.triki@acm.org>
Thu, 5 Mar 2015 02:50:24 +0000
(
03:50
+0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 7 Mar 2015 00:12:22 +0000
(16:12 -0800)
The failure code is negative. So check <0 instead of <=0.
Return the failure code instead of -ENXIO.
Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_driver.c
patch
|
blob
|
history
diff --git
a/drivers/staging/dgnc/dgnc_driver.c
b/drivers/staging/dgnc/dgnc_driver.c
index
c1d1a97
..
fa1ee79
100644
(file)
--- a/
drivers/staging/dgnc/dgnc_driver.c
+++ b/
drivers/staging/dgnc/dgnc_driver.c
@@
-251,9
+251,9
@@
static int dgnc_start(void)
* Register management/dpa devices
*/
rc = register_chrdev(0, "dgnc", &dgnc_BoardFops);
- if (rc <
=
0) {
+ if (rc < 0) {
pr_err(DRVSTR ": Can't register dgnc driver device (%d)\n", rc);
- return
-ENXIO
;
+ return
rc
;
}
dgnc_Major = rc;