Skip to content
Commit c78c95f9 authored by Harshal Chaudhari's avatar Harshal Chaudhari Committed by Greg Kroah-Hartman
Browse files

misc: xilinx-sdfec: remove check for ioctl cmd and argument.



if (_IOC_TYPE(cmd) != PP_IOCTL)
        return -ENOTTY;

Invalid ioctl command check normally performs by “default” case.

if (_IOC_DIR(cmd) != _IOC_NONE) {
       argp = (void __user *)arg;
       if (!argp)
             return -EINVAL; }

And for checking ioctl arguments, copy_from_user()/copy_to_user()
checks are enough.

Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarHarshal Chaudhari <harshalchau04@gmail.com>
Link: https://lore.kernel.org/r/20201101170949.18616-1-harshalchau04@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 33fcc549
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment