mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-09-28 00:00:22 +02:00
camera: rate limit some error messages
Our kernel doesn't like log spam. Issue: SEC-2082 Test: run sts-engbuild-no-spl-lock -m StsHostTestCases -t android.security.sts.Poc17_01#testPocCVE_2016_8412 Change-Id: I85455ec68ad57c0c4ba5f9de5e4d87fadcdf2adf
This commit is contained in:
committed by
Francescodario Cuzzocrea
parent
cd1d497d78
commit
4e7f1f0846
@@ -13,6 +13,7 @@
|
||||
#define pr_fmt(fmt) "%s:%d " fmt, __func__, __LINE__
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/ratelimit.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include "msm_sd.h"
|
||||
@@ -1885,7 +1886,7 @@ static int msm_actuator_close(struct v4l2_subdev *sd,
|
||||
rc = a_ctrl->i2c_client.i2c_func_tbl->i2c_util(
|
||||
&a_ctrl->i2c_client, MSM_CCI_RELEASE);
|
||||
if (rc < 0)
|
||||
pr_err("cci_init failed\n");
|
||||
pr_err_ratelimited("cci_init failed\n");
|
||||
}
|
||||
vfree(a_ctrl->i2c_reg_seq_tbl);
|
||||
a_ctrl->i2c_reg_seq_tbl = NULL;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/ratelimit.h>
|
||||
#include <media/msm_isp.h>
|
||||
#include "msm_sd.h"
|
||||
#include "msm_cci.h"
|
||||
@@ -709,7 +710,7 @@ static int32_t msm_cci_release(struct v4l2_subdev *sd)
|
||||
cci_dev = v4l2_get_subdevdata(sd);
|
||||
|
||||
if (!cci_dev->ref_count || cci_dev->cci_state != CCI_STATE_ENABLED) {
|
||||
pr_err("%s invalid ref count %d / cci state %d\n",
|
||||
pr_err_ratelimited("%s invalid ref count %d / cci state %d\n",
|
||||
__func__, cci_dev->ref_count, cci_dev->cci_state);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/ratelimit.h>
|
||||
#include <mach/camera2.h>
|
||||
#include "msm_camera_i2c.h"
|
||||
#include "msm_cci.h"
|
||||
@@ -674,7 +675,7 @@ int32_t msm_sensor_cci_i2c_util(struct msm_camera_i2c_client *client,
|
||||
rc = v4l2_subdev_call(client->cci_client->cci_subdev,
|
||||
core, ioctl, VIDIOC_MSM_CCI_CFG, &cci_ctrl);
|
||||
if (rc < 0) {
|
||||
pr_err("%s line %d rc = %d\n", __func__, __LINE__, rc);
|
||||
pr_err_ratelimited("%s line %d rc = %d\n", __func__, __LINE__, rc);
|
||||
return rc;
|
||||
}
|
||||
return cci_ctrl.status;
|
||||
|
||||
Reference in New Issue
Block a user