Commit c9d9602f authored by Varsha Rao's avatar Varsha Rao Committed by Greg Kroah-Hartman

staging: media: atomisp: Replace NULL comparison.

Replaced x == NULL with !x, by using the following coccinelle script:

@disable is_null@
expression e;
@@

-e==NULL
+!e

This patch fixes the checkpatch issue.
Signed-off-by: default avatarVarsha Rao <rvarsha016@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent da79269d
......@@ -294,7 +294,7 @@ static int gc0310_get_intg_factor(struct i2c_client *client,
unsigned int vert_blanking;
unsigned int sh_delay;
if (info == NULL)
if (!info)
return -EINVAL;
/* pixel clock calculattion */
......@@ -803,7 +803,7 @@ static int power_up(struct v4l2_subdev *sd)
int ret;
pr_info("%s S\n", __func__);
if (NULL == dev->platform_data) {
if (!dev->platform_data) {
dev_err(&client->dev,
"no camera_sensor_platform_data");
return -ENODEV;
......@@ -848,7 +848,7 @@ static int power_down(struct v4l2_subdev *sd)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
if (NULL == dev->platform_data) {
if (!dev->platform_data) {
dev_err(&client->dev,
"no camera_sensor_platform_data");
return -ENODEV;
......@@ -996,7 +996,7 @@ static int gc0310_set_fmt(struct v4l2_subdev *sd,
return -EINVAL;
gc0310_info = v4l2_get_subdev_hostdata(sd);
if (gc0310_info == NULL)
if (!gc0310_info)
return -EINVAL;
mutex_lock(&dev->input_lock);
......@@ -1159,7 +1159,7 @@ static int gc0310_s_config(struct v4l2_subdev *sd,
int ret = 0;
pr_info("%s S\n", __func__);
if (platform_data == NULL)
if (!platform_data)
return -ENODEV;
dev->platform_data =
......
......@@ -250,7 +250,7 @@ static int gc2235_get_intg_factor(struct i2c_client *client,
u16 reg_val, reg_val_h, dummy;
int ret;
if (info == NULL)
if (!info)
return -EINVAL;
/* pixel clock calculattion */
......@@ -596,7 +596,7 @@ static int power_up(struct v4l2_subdev *sd)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret;
if (NULL == dev->platform_data) {
if (!dev->platform_data) {
dev_err(&client->dev,
"no camera_sensor_platform_data");
return -ENODEV;
......@@ -640,7 +640,7 @@ static int power_down(struct v4l2_subdev *sd)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
if (NULL == dev->platform_data) {
if (!dev->platform_data) {
dev_err(&client->dev,
"no camera_sensor_platform_data");
return -ENODEV;
......@@ -789,7 +789,7 @@ static int gc2235_set_fmt(struct v4l2_subdev *sd,
int idx;
gc2235_info = v4l2_get_subdev_hostdata(sd);
if (gc2235_info == NULL)
if (!gc2235_info)
return -EINVAL;
if (format->pad)
return -EINVAL;
......@@ -908,7 +908,7 @@ static int gc2235_s_config(struct v4l2_subdev *sd,
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
if (platform_data == NULL)
if (!platform_data)
return -ENODEV;
dev->platform_data =
......
......@@ -323,7 +323,7 @@ static int ov2680_get_intg_factor(struct i2c_client *client,
u16 reg_val;
int ret;
ov2680_debug(dev, "++++ov2680_get_intg_factor\n");
if (info == NULL)
if (!info)
return -EINVAL;
/* pixel clock */
......@@ -899,7 +899,7 @@ static int power_up(struct v4l2_subdev *sd)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret;
if (NULL == dev->platform_data) {
if (!dev->platform_data) {
dev_err(&client->dev,
"no camera_sensor_platform_data");
return -ENODEV;
......@@ -948,7 +948,7 @@ static int power_down(struct v4l2_subdev *sd)
h_flag = 0;
v_flag = 0;
if (NULL == dev->platform_data) {
if (!dev->platform_data) {
dev_err(&client->dev,
"no camera_sensor_platform_data");
return -ENODEV;
......@@ -1077,7 +1077,7 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
return -EINVAL;
ov2680_info = v4l2_get_subdev_hostdata(sd);
if (ov2680_info == NULL)
if (!ov2680_info)
return -EINVAL;
mutex_lock(&dev->input_lock);
......@@ -1233,7 +1233,7 @@ static int ov2680_s_config(struct v4l2_subdev *sd,
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
if (platform_data == NULL)
if (!platform_data)
return -ENODEV;
dev->platform_data =
......
......@@ -295,7 +295,7 @@ static int ov2722_get_intg_factor(struct i2c_client *client,
u16 reg_val;
int ret;
if (info == NULL)
if (!info)
return -EINVAL;
dev = to_ov2722_sensor(sd);
......@@ -699,7 +699,7 @@ static int power_up(struct v4l2_subdev *sd)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret;
if (NULL == dev->platform_data) {
if (!dev->platform_data) {
dev_err(&client->dev,
"no camera_sensor_platform_data");
return -ENODEV;
......@@ -746,7 +746,7 @@ static int power_down(struct v4l2_subdev *sd)
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
if (NULL == dev->platform_data) {
if (!dev->platform_data) {
dev_err(&client->dev,
"no camera_sensor_platform_data");
return -ENODEV;
......@@ -893,7 +893,7 @@ static int ov2722_set_fmt(struct v4l2_subdev *sd,
if (!fmt)
return -EINVAL;
ov2722_info = v4l2_get_subdev_hostdata(sd);
if (ov2722_info == NULL)
if (!ov2722_info)
return -EINVAL;
mutex_lock(&dev->input_lock);
......@@ -1037,7 +1037,7 @@ static int ov2722_s_config(struct v4l2_subdev *sd,
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
if (platform_data == NULL)
if (!platform_data)
return -ENODEV;
dev->platform_data =
......@@ -1268,7 +1268,7 @@ static int __ov2722_init_ctrl_handler(struct ov2722_device *dev)
dev->link_freq = v4l2_ctrl_find(&dev->ctrl_handler, V4L2_CID_LINK_FREQ);
if (dev->ctrl_handler.error || dev->link_freq == NULL)
if (dev->ctrl_handler.error || !dev->link_freq)
return dev->ctrl_handler.error;
dev->sd.ctrl_handler = hdl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment