Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Varsha Rao and committed by
Greg Kroah-Hartman
c9d9602f da79269d

+21 -21
+5 -5
drivers/staging/media/atomisp/i2c/gc0310.c
··· 294 294 unsigned int vert_blanking; 295 295 unsigned int sh_delay; 296 296 297 - if (info == NULL) 297 + if (!info) 298 298 return -EINVAL; 299 299 300 300 /* pixel clock calculattion */ ··· 803 803 int ret; 804 804 805 805 pr_info("%s S\n", __func__); 806 - if (NULL == dev->platform_data) { 806 + if (!dev->platform_data) { 807 807 dev_err(&client->dev, 808 808 "no camera_sensor_platform_data"); 809 809 return -ENODEV; ··· 848 848 struct i2c_client *client = v4l2_get_subdevdata(sd); 849 849 int ret = 0; 850 850 851 - if (NULL == dev->platform_data) { 851 + if (!dev->platform_data) { 852 852 dev_err(&client->dev, 853 853 "no camera_sensor_platform_data"); 854 854 return -ENODEV; ··· 996 996 return -EINVAL; 997 997 998 998 gc0310_info = v4l2_get_subdev_hostdata(sd); 999 - if (gc0310_info == NULL) 999 + if (!gc0310_info) 1000 1000 return -EINVAL; 1001 1001 1002 1002 mutex_lock(&dev->input_lock); ··· 1159 1159 int ret = 0; 1160 1160 1161 1161 pr_info("%s S\n", __func__); 1162 - if (platform_data == NULL) 1162 + if (!platform_data) 1163 1163 return -ENODEV; 1164 1164 1165 1165 dev->platform_data =
+5 -5
drivers/staging/media/atomisp/i2c/gc2235.c
··· 250 250 u16 reg_val, reg_val_h, dummy; 251 251 int ret; 252 252 253 - if (info == NULL) 253 + if (!info) 254 254 return -EINVAL; 255 255 256 256 /* pixel clock calculattion */ ··· 596 596 struct i2c_client *client = v4l2_get_subdevdata(sd); 597 597 int ret; 598 598 599 - if (NULL == dev->platform_data) { 599 + if (!dev->platform_data) { 600 600 dev_err(&client->dev, 601 601 "no camera_sensor_platform_data"); 602 602 return -ENODEV; ··· 640 640 struct i2c_client *client = v4l2_get_subdevdata(sd); 641 641 int ret = 0; 642 642 643 - if (NULL == dev->platform_data) { 643 + if (!dev->platform_data) { 644 644 dev_err(&client->dev, 645 645 "no camera_sensor_platform_data"); 646 646 return -ENODEV; ··· 789 789 int idx; 790 790 791 791 gc2235_info = v4l2_get_subdev_hostdata(sd); 792 - if (gc2235_info == NULL) 792 + if (!gc2235_info) 793 793 return -EINVAL; 794 794 if (format->pad) 795 795 return -EINVAL; ··· 908 908 struct i2c_client *client = v4l2_get_subdevdata(sd); 909 909 int ret = 0; 910 910 911 - if (platform_data == NULL) 911 + if (!platform_data) 912 912 return -ENODEV; 913 913 914 914 dev->platform_data =
+5 -5
drivers/staging/media/atomisp/i2c/ov2680.c
··· 323 323 u16 reg_val; 324 324 int ret; 325 325 ov2680_debug(dev, "++++ov2680_get_intg_factor\n"); 326 - if (info == NULL) 326 + if (!info) 327 327 return -EINVAL; 328 328 329 329 /* pixel clock */ ··· 899 899 struct i2c_client *client = v4l2_get_subdevdata(sd); 900 900 int ret; 901 901 902 - if (NULL == dev->platform_data) { 902 + if (!dev->platform_data) { 903 903 dev_err(&client->dev, 904 904 "no camera_sensor_platform_data"); 905 905 return -ENODEV; ··· 948 948 949 949 h_flag = 0; 950 950 v_flag = 0; 951 - if (NULL == dev->platform_data) { 951 + if (!dev->platform_data) { 952 952 dev_err(&client->dev, 953 953 "no camera_sensor_platform_data"); 954 954 return -ENODEV; ··· 1077 1077 return -EINVAL; 1078 1078 1079 1079 ov2680_info = v4l2_get_subdev_hostdata(sd); 1080 - if (ov2680_info == NULL) 1080 + if (!ov2680_info) 1081 1081 return -EINVAL; 1082 1082 1083 1083 mutex_lock(&dev->input_lock); ··· 1233 1233 struct i2c_client *client = v4l2_get_subdevdata(sd); 1234 1234 int ret = 0; 1235 1235 1236 - if (platform_data == NULL) 1236 + if (!platform_data) 1237 1237 return -ENODEV; 1238 1238 1239 1239 dev->platform_data =
+6 -6
drivers/staging/media/atomisp/i2c/ov2722.c
··· 295 295 u16 reg_val; 296 296 int ret; 297 297 298 - if (info == NULL) 298 + if (!info) 299 299 return -EINVAL; 300 300 301 301 dev = to_ov2722_sensor(sd); ··· 699 699 struct i2c_client *client = v4l2_get_subdevdata(sd); 700 700 int ret; 701 701 702 - if (NULL == dev->platform_data) { 702 + if (!dev->platform_data) { 703 703 dev_err(&client->dev, 704 704 "no camera_sensor_platform_data"); 705 705 return -ENODEV; ··· 746 746 struct i2c_client *client = v4l2_get_subdevdata(sd); 747 747 int ret = 0; 748 748 749 - if (NULL == dev->platform_data) { 749 + if (!dev->platform_data) { 750 750 dev_err(&client->dev, 751 751 "no camera_sensor_platform_data"); 752 752 return -ENODEV; ··· 893 893 if (!fmt) 894 894 return -EINVAL; 895 895 ov2722_info = v4l2_get_subdev_hostdata(sd); 896 - if (ov2722_info == NULL) 896 + if (!ov2722_info) 897 897 return -EINVAL; 898 898 899 899 mutex_lock(&dev->input_lock); ··· 1037 1037 struct i2c_client *client = v4l2_get_subdevdata(sd); 1038 1038 int ret = 0; 1039 1039 1040 - if (platform_data == NULL) 1040 + if (!platform_data) 1041 1041 return -ENODEV; 1042 1042 1043 1043 dev->platform_data = ··· 1268 1268 1269 1269 dev->link_freq = v4l2_ctrl_find(&dev->ctrl_handler, V4L2_CID_LINK_FREQ); 1270 1270 1271 - if (dev->ctrl_handler.error || dev->link_freq == NULL) 1271 + if (dev->ctrl_handler.error || !dev->link_freq) 1272 1272 return dev->ctrl_handler.error; 1273 1273 1274 1274 dev->sd.ctrl_handler = hdl;