dect
/
linux-2.6
Archived
13
0
Fork 0

cdrom: cleanup hardcoded error-code

This patch eliminates hardcoded return value of register_cdrom().

It also changes the return value to -EINVAL.
It is more appropriate than -2 (-ENOENT) because it is only
happen invalid usage of register_cdrom() by broken cdrom driver.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
Akinobu Mita 2008-03-26 12:09:00 +01:00 committed by Jens Axboe
parent 17672cf0a7
commit 3c3f4e012a
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ int register_cdrom(struct cdrom_device_info *cdi)
cdinfo(CD_OPEN, "entering register_cdrom\n");
if (cdo->open == NULL || cdo->release == NULL)
return -2;
return -EINVAL;
if (!banner_printed) {
printk(KERN_INFO "Uniform CD-ROM driver " REVISION "\n");
banner_printed = 1;