From e56710d26eba07abca34c39c50e02e854436000a Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Fri, 6 Apr 2018 16:30:36 -0500 Subject: [PATCH] ipmi_devintf: Add an error return on invalid ioctls Signed-off-by: Corey Minyard --- drivers/char/ipmi/ipmi_devintf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index b36a91fb7cd5b1..1a486aec99b6a9 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c @@ -608,6 +608,10 @@ static long ipmi_ioctl(struct file *file, rv = ipmi_set_maintenance_mode(priv->user, mode); break; } + + default: + rv = -ENOTTY; + break; } return rv;