diff options
4 files changed, 11 insertions, 10 deletions
diff --git a/drivers/media/platform/msm/camera_v2/common/cam_soc_api.c b/drivers/media/platform/msm/camera_v2/common/cam_soc_api.c index a0c606ce9a29..2dca190413d1 100644 --- a/drivers/media/platform/msm/camera_v2/common/cam_soc_api.c +++ b/drivers/media/platform/msm/camera_v2/common/cam_soc_api.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2015-2017, 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -205,7 +205,7 @@ int msm_camera_get_clk_info(struct platform_device *pdev, { int rc = 0; - if (!pdev || !&pdev->dev || !clk_info || !clk_ptr || !num_clk) + if (!pdev || (&pdev->dev == NULL) || !clk_info || !clk_ptr || !num_clk) return -EINVAL; rc = msm_camera_get_clk_info_internal(&pdev->dev, @@ -507,7 +507,7 @@ int msm_camera_put_clk_info(struct platform_device *pdev, { int rc = 0; - if (!pdev || !&pdev->dev || !clk_info || !clk_ptr) + if (!pdev || (&pdev->dev == NULL) || !clk_info || !clk_ptr) return -EINVAL; rc = msm_camera_put_clk_info_internal(&pdev->dev, diff --git a/drivers/media/platform/msm/camera_v2/msm.c b/drivers/media/platform/msm/camera_v2/msm.c index 7689aa3dba77..e16d08681695 100644 --- a/drivers/media/platform/msm/camera_v2/msm.c +++ b/drivers/media/platform/msm/camera_v2/msm.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -622,7 +622,7 @@ static inline int __msm_remove_session_cmd_ack_q(void *d1, void *d2) { struct msm_command_ack *cmd_ack = d1; - if (!(&cmd_ack->command_q)) + if (&cmd_ack->command_q == NULL) return 0; msm_queue_drain(&cmd_ack->command_q, struct msm_command, list); @@ -632,7 +632,7 @@ static inline int __msm_remove_session_cmd_ack_q(void *d1, void *d2) static void msm_remove_session_cmd_ack_q(struct msm_session *session) { - if ((!session) || !(&session->command_ack_q)) + if ((!session) || (&session->command_ack_q == NULL)) return; mutex_lock(&session->lock); diff --git a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c index c77367ed1603..4ca4ac1860c8 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c +++ b/drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2009-2017, 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -363,7 +363,8 @@ static int32_t msm_flash_i2c_release( { int32_t rc = 0; - if (!(&flash_ctrl->power_info) || !(&flash_ctrl->flash_i2c_client)) { + if ((&flash_ctrl->power_info == NULL) || + (&flash_ctrl->flash_i2c_client == NULL)) { pr_err("%s:%d failed: %pK %pK\n", __func__, __LINE__, &flash_ctrl->power_info, &flash_ctrl->flash_i2c_client); diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c index 457bd1730232..4a4f0995785f 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2017, 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1353,7 +1353,7 @@ int msm_cam_sensor_handle_reg_gpio(int seq_val, CDBG("%s: %d GPIO offset: %d, seq_val: %d\n", __func__, __LINE__, gpio_offset, seq_val); - if ((gconf->gpio_num_info->valid[gpio_offset] == 1)) { + if (gconf->gpio_num_info->valid[gpio_offset] == 1) { gpio_set_value_cansleep( gconf->gpio_num_info->gpio_num [gpio_offset], val); |