Skip to content

Commit 5e25db8

Browse files
William Breathitt Graygregkh
authored andcommitted
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 <[email protected]> Reported-by: Sasha Levin <[email protected]> Tested-by: Ye Xiaolong Signed-off-by: William Breathitt Gray <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 32a5a0c commit 5e25db8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/linux/isa.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define __LINUX_ISA_H
77

88
#include <linux/device.h>
9+
#include <linux/errno.h>
910
#include <linux/kernel.h>
1011

1112
struct isa_driver {
@@ -28,7 +29,7 @@ void isa_unregister_driver(struct isa_driver *);
2829
#else
2930
static inline int isa_register_driver(struct isa_driver *d, unsigned int i)
3031
{
31-
return 0;
32+
return -ENODEV;
3233
}
3334

3435
static inline void isa_unregister_driver(struct isa_driver *d)

0 commit comments

Comments
 (0)