Skip to content

Commit

Permalink
net: atm: Add another IS_ENABLED(CONFIG_COMPAT) in atm_dev_ioctl
Browse files Browse the repository at this point in the history
I removed compat's universal assignment to 0, which allows this if
statement to fall through when compat is passed with a value other
than 0.

Fixes: f9d19a7 ("net: atm: Use IS_ENABLED in atm_dev_ioctl")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nathan Chancellor authored and David S. Miller committed Mar 7, 2019
1 parent df10317 commit 0805a4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/atm/resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg, int compat)
}
/* fall through */
default:
if (compat) {
if (IS_ENABLED(CONFIG_COMPAT) && compat) {
#ifdef CONFIG_COMPAT
if (!dev->ops->compat_ioctl) {
error = -EINVAL;
Expand Down

0 comments on commit 0805a4b

Please sign in to comment.