isa: Dummy isa_register_driver should return error code
The inline isa_register_driver stub simply allows compilation on systems with CONFIG_ISA disabled; the dummy isa_register_driver does not register an isa_driver at all. The inline isa_register_driver should return -ENODEV to indicate lack of support when attempting to register an isa_driver on such a system with CONFIG_ISA disabled. Cc: Matthew Wilcox <matthew@wil.cx> Reported-by: Sasha Levin <sasha.levin@oracle.com> Tested-by: Ye Xiaolong Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
32a5a0c047
commit
5e25db870e
|
@ -6,6 +6,7 @@
|
|||
#define __LINUX_ISA_H
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
struct isa_driver {
|
||||
|
@ -28,7 +29,7 @@ void isa_unregister_driver(struct isa_driver *);
|
|||
#else
|
||||
static inline int isa_register_driver(struct isa_driver *d, unsigned int i)
|
||||
{
|
||||
return 0;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline void isa_unregister_driver(struct isa_driver *d)
|
||||
|
|
Loading…
Reference in New Issue