The failure code is negative. So check <0 instead of <=0. Signed-off-by: Salah Triki <salah.triki@xxxxxxx> --- drivers/staging/dgnc/dgnc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index f177d3a..4341125 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -251,7 +251,7 @@ 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; } -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel