Merge "msm: kgsl: Avoid flooding kernel log with invalid ioctl errors"

This commit is contained in:
qctecmdr 2021-05-10 01:39:19 -07:00 • committed by Gerrit - the friendly Code Review server
commit 8e8bbdacf2
3 changed files with 4 additions and 11 deletions

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2002,2007-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2002,2007-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/slab.h>
@ -183,11 +183,8 @@ long adreno_ioctl_helper(struct kgsl_device_private *dev_priv,
break;
}
if (i == len) {
dev_err(dev_priv->device->dev,
"invalid ioctl code 0x%08X\n", cmd);
if (i == len)
return -ENOIOCTLCMD;
}
if (_IOC_SIZE(cmds[i].cmd > sizeof(data))) {
dev_err_ratelimited(dev_priv->device->dev,

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
*/
#include "kgsl_device.h"
@ -384,8 +384,6 @@ long kgsl_compat_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
if (ret == -ENOIOCTLCMD) {
if (device->ftbl->compat_ioctl != NULL)
return device->ftbl->compat_ioctl(dev_priv, cmd, arg);
dev_err(device->dev, "invalid ioctl code 0x%08X\n", cmd);
}
return ret;

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2008-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2008-2021, The Linux Foundation. All rights reserved.
*/
#include "kgsl_device.h"
@ -181,8 +181,6 @@ long kgsl_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
return device->ftbl->compat_ioctl(dev_priv, cmd, arg);
else if (device->ftbl->ioctl != NULL)
return device->ftbl->ioctl(dev_priv, cmd, arg);
dev_err(device->dev, "invalid ioctl code 0x%08X\n", cmd);
}
return ret;