mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
qcom_wdt_core: Validate the input parameters of qcom_wdt_register
Ensure that the input parameters of qcom_wdt_register is checked before proceeding as this could cause NULL pointer dereferences. Change-Id: I29e7eee946fb9fe0ba7fe75b96acedff7deab4bd Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
This commit is contained in:
parent
2c5e9303bf
commit
8bbe418836
1 changed files with 5 additions and 0 deletions
|
|
@ -1003,6 +1003,11 @@ int qcom_wdt_register(struct platform_device *pdev,
|
|||
struct md_region md_entry;
|
||||
int ret;
|
||||
|
||||
if (!pdev || !wdog_dd || !wdog_dd_name) {
|
||||
pr_err("wdt_register input incorrect\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
qcom_wdt_dt_to_pdata(pdev, wdog_dd);
|
||||
wdog_data = wdog_dd;
|
||||
wdog_dd->dev = &pdev->dev;
|
||||
|
|
|
|||
Loading…
Reference in a new issue