X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fwatchdog%2Frc32434_wdt.c;h=3a75f3b53452cdb51f49882a26480cbcf8673fb9;hb=79ae01aa89b569ed599d1263eb26c6b98f039c27;hp=71e78ef4b736a1b035e69f5cef063b3a528aaebc;hpb=bbf44583ace773a2e157339b0ce72f7d146685e9;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/watchdog/rc32434_wdt.c b/drivers/watchdog/rc32434_wdt.c index 71e78ef4b736..3a75f3b53452 100644 --- a/drivers/watchdog/rc32434_wdt.c +++ b/drivers/watchdog/rc32434_wdt.c @@ -237,7 +237,7 @@ static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd, return -EINVAL; /* Fall through */ case WDIOC_GETTIMEOUT: - return copy_to_user(argp, &timeout, sizeof(int)); + return copy_to_user(argp, &timeout, sizeof(int)) ? -EFAULT : 0; default: return -ENOTTY; }