[PATCH 1/2] staging: comedi: don't return minor from comedi_alloc_subdevice_minor()

Ian Abbott abbotti at mev.co.uk
Thu Feb 7 16:03:00 UTC 2013


`comedi_alloc_subdevice_minor()` currently returns the allocated minor
device number on success.  This is not really of any interest to the
caller (in fact the return value is not even checked), so just return 0
on success.  If the caller really needs to know the allocated minor
device number it can look in `s->minor`.

Signed-off-by: Ian Abbott <abbotti at mev.co.uk>
---
 drivers/staging/comedi/comedi_fops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index b1e8cdb..4f587ea 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2383,7 +2383,7 @@ int comedi_alloc_subdevice_minor(struct comedi_subdevice *s)
 		s->class_dev = csdev;
 	dev_set_drvdata(csdev, info);
 
-	return i;
+	return 0;
 }
 
 void comedi_free_subdevice_minor(struct comedi_subdevice *s)
-- 
1.8.1.2




More information about the devel mailing list