]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
atomisp: remove a sysfs error message that can be used to log spam
authorAlan Cox <alan@linux.intel.com>
Mon, 20 Mar 2017 14:42:41 +0000 (14:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Mar 2017 07:04:33 +0000 (08:04 +0100)
Instead of logging this just report ERANGE as an error, which will give something close to the
right user space report.

The others of these were already removed by Dan Carpenter's patch.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c

index 7f7c6d5133d2e04d2130668a52fbaaf05562e4ed..fcfe8d7190b08a14ddfac4a2b5d5b79344f868ee 100644 (file)
@@ -107,9 +107,7 @@ static ssize_t iunit_dbglvl_store(struct device_driver *drv, const char *buf,
        if (kstrtouint(buf, 10, &iunit_debug.dbglvl)
                || iunit_debug.dbglvl < 1
                || iunit_debug.dbglvl > 9) {
-               dev_err(atomisp_dev, "%s setting %d value invalid, should be [1,9]\n",
-                       __func__, iunit_debug.dbglvl);
-               return -EINVAL;
+               return -ERANGE;
        }
        atomisp_css_debug_set_dtrace_level(iunit_debug.dbglvl);