diff options
| author | Michael Bestas <mkbestas@lineageos.org> | 2020-08-23 00:20:52 +0300 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2020-08-23 00:20:52 +0300 |
| commit | 3cc2d2aa8574a94aca65ac664c3a0fb23d930700 (patch) | |
| tree | 0632ac13a4a41364069b5bee86953579123c5b46 /drivers/video/fbdev/msm | |
| parent | 81d0e1715dc7ad78d029cfafc6810bbb90281247 (diff) | |
| parent | adec4f93e1705640e7b03d33394224ff5d835280 (diff) | |
Merge tag 'LA.UM.8.4.r1-05900-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4 into lineage-17.1-caf-msm8998
* tag 'LA.UM.8.4.r1-05900-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4:
msm: kgsl: Mark the scratch buffer as privileged
power: qcom: Add the QPNP QGAUGE (QG) headers
msm: ipa: update msm_ipa.h with latest IPA versions constants
nl80211: add NL80211_CMD_UPDATE_FT_IES to supported commands
msm: mdss: hdmi: proper error logging
ASoC: Fix warnings and errors with llvm
sdm660_cdc: Reset cache_only mode for non SSR scenario
include: Fix for compilation issue
Makefile: Suppress few warnings with clang
kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS
kbuild: initialize CLANG_FLAGS correctly in the top Makefile
kbuild: consolidate Clang compiler flags
kbuild: add -no-integrated-as Clang option unconditionally
power: qpnp-fg-gen3: Fix warning with llvm
lkdtm: Fix warning with llvm
AndroidKernel: Explicitly mark certain targets as phony
dsp: q6asm: Change to increase asm sessions allowed
dsp: q6adm: Channel map configuration for multi-channel
defconfig: Create symbolic link for arm64 defconfigs
scripts/build-all: remove pattern-based defconfig detection
scripts/build-all: look for nested vendor/ defconfig directories
scripts/build-all: remove all defconfig manipulation options
scripts: build-all.py: update regex to compile all defconfigs
scripts: build-all.py: append llvm to the config file
scripts: Clean up the gcc-wrapper white list
scripts: set clang as REAL_CC to support LLVM by default
defconfig: auto: remove auto defconfigs
vgacon: Fix a UAF in vgacon_invert_region
soc: qcom: Reset string table index for each dump collection request
msm: adsprpc: Fix array index underflow problem
ath10k: remove unnecessary code
drm/msm/dsi: use correct enum in dsi_get_cmd_fmt
btrfs: Remove extra parentheses from condition in copy_items()
do_last(): fetch directory ->i_mode and ->i_uid before it's too late
Conflicts:
fs/namei.c
scripts/gcc-wrapper.py
Change-Id: Icfb78abcc0f2cf980b5c0ceaf40f108038b1b527
Diffstat (limited to 'drivers/video/fbdev/msm')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_tx.c | 124 |
1 files changed, 97 insertions, 27 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c index b70937a8f5fe..747c245bf78e 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c @@ -509,8 +509,13 @@ void *hdmi_get_featuredata_from_sysfs_dev(struct device *device, { struct hdmi_tx_ctrl *hdmi_ctrl = NULL; - if (!device || feature_type >= HDMI_TX_FEAT_MAX) { - DEV_ERR("%s: invalid input\n", __func__); + if (!device) { + DEV_ERR("%s: invalid device data\n", __func__); + return NULL; + } + + if (feature_type >= HDMI_TX_FEAT_MAX) { + DEV_ERR("%s: feature_type exceeding max value\n", __func__); return NULL; } @@ -583,8 +588,13 @@ static ssize_t hdmi_tx_sysfs_wta_edid(struct device *dev, hdmi_ctrl = hdmi_tx_get_drvdata_from_sysfs_dev(dev); - if (!hdmi_ctrl || !hdmi_ctrl->edid_buf) { - DEV_ERR("%s: invalid data\n", __func__); + if (!hdmi_ctrl) { + DEV_ERR("%s: invalid hdmi_ctrl data\n", __func__); + return -EINVAL; + } + + if (!hdmi_ctrl->edid_buf) { + DEV_ERR("%s: invalid edid_buf data\n", __func__); return -EINVAL; } @@ -635,8 +645,13 @@ static ssize_t hdmi_tx_sysfs_rda_edid(struct device *dev, hdmi_ctrl = hdmi_tx_get_drvdata_from_sysfs_dev(dev); - if (!hdmi_ctrl || !hdmi_ctrl->edid_buf) { - DEV_ERR("%s: invalid data\n", __func__); + if (!hdmi_ctrl) { + DEV_ERR("%s: invalid hdmi_ctrl data\n", __func__); + return -EINVAL; + } + + if (!hdmi_ctrl->edid_buf) { + DEV_ERR("%s: invalid edid_buf data\n", __func__); return -EINVAL; } @@ -1495,8 +1510,13 @@ static int hdmi_tx_sysfs_create(struct hdmi_tx_ctrl *hdmi_ctrl, { int rc; - if (!hdmi_ctrl || !fbi) { - DEV_ERR("%s: invalid input\n", __func__); + if (!hdmi_ctrl) { + DEV_ERR("%s: invalid hdmi_ctrl data\n", __func__); + return -ENODEV; + } + + if (!fbi) { + DEV_ERR("%s: invalid fb_info data\n", __func__); return -ENODEV; } @@ -2163,8 +2183,14 @@ static int hdmi_tx_init_features(struct hdmi_tx_ctrl *hdmi_ctrl, int ret = 0; u32 deinit_features = 0; - if (!hdmi_ctrl || !fbi) { - DEV_ERR("%s: invalid input\n", __func__); + if (!hdmi_ctrl) { + DEV_ERR("%s: invalid hdmi_ctrl data\n", __func__); + ret = -EINVAL; + goto end; + } + + if (!fbi) { + DEV_ERR("%s: invalid fb_info data\n", __func__); ret = -EINVAL; goto end; } @@ -2761,8 +2787,14 @@ static int hdmi_tx_config_power(struct hdmi_tx_ctrl *hdmi_ctrl, struct dss_module_power *power_data = NULL; char name[MAX_CLIENT_NAME_LEN]; - if (!hdmi_ctrl || module >= HDMI_TX_MAX_PM) { - DEV_ERR("%s: Error: invalid input\n", __func__); + if (!hdmi_ctrl) { + DEV_ERR("%s: invalid hdmi_ctrl data\n", __func__); + rc = -EINVAL; + goto exit; + } + + if (module >= HDMI_TX_MAX_PM) { + DEV_ERR("%s: power_module exceeding max value\n", __func__); rc = -EINVAL; goto exit; } @@ -2829,8 +2861,14 @@ static int hdmi_tx_enable_power(struct hdmi_tx_ctrl *hdmi_ctrl, int rc = 0; struct dss_module_power *power_data = NULL; - if (!hdmi_ctrl || module >= HDMI_TX_MAX_PM) { - DEV_ERR("%s: Error: invalid input\n", __func__); + if (!hdmi_ctrl) { + DEV_ERR("%s: invalid hdmi_ctrl data\n", __func__); + rc = -EINVAL; + goto error; + } + + if (module >= HDMI_TX_MAX_PM) { + DEV_ERR("%s: power_module exceeding max value\n", __func__); rc = -EINVAL; goto error; } @@ -3170,8 +3208,13 @@ static int hdmi_tx_audio_info_setup(struct platform_device *pdev, struct hdmi_tx_ctrl *hdmi_ctrl = platform_get_drvdata(pdev); u32 is_mode_dvi; - if (!hdmi_ctrl || !params) { - DEV_ERR("%s: invalid input\n", __func__); + if (!hdmi_ctrl) { + DEV_ERR("%s: invalid hdmi_ctrl data\n", __func__); + return -ENODEV; + } + + if (!params) { + DEV_ERR("%s: invalid audio_setup params\n", __func__); return -ENODEV; } @@ -4637,8 +4680,14 @@ static int hdmi_tx_get_dt_clk_data(struct device *dev, struct dss_module_power *hpd_power_data = NULL; struct dss_module_power *core_power_data = NULL; - if (!dev || !pdata) { - pr_err("%s: invalid input\n", __func__); + if (!dev) { + pr_err("%s: invalid device data\n", __func__); + rc = -EINVAL; + goto exit; + } + + if (!pdata) { + pr_err("%s: invalid hdmi platform data\n", __func__); rc = -EINVAL; goto exit; } @@ -4711,8 +4760,13 @@ static int hdmi_tx_get_dt_vreg_data(struct device *dev, const char *mod_name = NULL; struct device_node *of_node = NULL; - if (!dev || !mp) { - DEV_ERR("%s: invalid input\n", __func__); + if (!dev) { + DEV_ERR("%s: invalid device data\n", __func__); + return -EINVAL; + } + + if (!mp) { + DEV_ERR("%s: invalid power_module data\n", __func__); return -EINVAL; } @@ -4901,15 +4955,20 @@ static int hdmi_tx_get_dt_gpio_data(struct device *dev, struct dss_gpio *gpio_list = NULL; struct device_node *of_node = NULL; - DEV_DBG("%s: module: '%s'\n", __func__, hdmi_tx_pm_name(module_type)); + if (!dev) { + DEV_ERR("%s: invalid device data\n", __func__); + return -EINVAL; + } - if (!dev || !mp) { - DEV_ERR("%s: invalid input\n", __func__); + if (!mp) { + DEV_ERR("%s: invalid power_module data\n", __func__); return -EINVAL; } of_node = dev->of_node; + DEV_DBG("%s: module: '%s'\n", __func__, hdmi_tx_pm_name(module_type)); + switch (module_type) { case HDMI_TX_HPD_PM: gpio_list_size = ARRAY_SIZE(hpd_gpio_config); @@ -4982,8 +5041,14 @@ static void hdmi_tx_put_dt_data(struct device *dev, struct hdmi_tx_platform_data *pdata) { int i; - if (!dev || !pdata) { - DEV_ERR("%s: invalid input\n", __func__); + + if (!dev) { + pr_err("%s: invalid device data\n", __func__); + return; + } + + if (!pdata) { + pr_err("%s: invalid hdmi platform data\n", __func__); return; } @@ -5005,8 +5070,13 @@ static int hdmi_tx_get_dt_data(struct platform_device *pdev, struct hdmi_tx_ctrl *hdmi_ctrl = platform_get_drvdata(pdev); const char *data; - if (!pdev || !pdata) { - DEV_ERR("%s: invalid input\n", __func__); + if (!pdev) { + pr_err("%s: invalid platform_device data\n", __func__); + return -EINVAL; + } + + if (!pdata) { + pr_err("%s: invalid hdmi platform data\n", __func__); return -EINVAL; } |
