mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
qcacmn: Add sanity checks
Add sanity checks for peer and dbr_pdev_obj->dbr_mod_param structure Change-Id: I9412be7b96df2ea62d5f0ec7d709fb45eb3849ce
This commit is contained in:
parent
7d5128c79b
commit
65eb1b106f
2 changed files with 8 additions and 5 deletions
|
|
@ -695,10 +695,15 @@ QDF_STATUS target_if_direct_buf_rx_module_register(
|
|||
direct_buf_rx_err("dir buf rx object is null");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
direct_buf_rx_info("Dbr pdev obj %pK", dbr_pdev_obj);
|
||||
|
||||
if (!dbr_pdev_obj->dbr_mod_param &&
|
||||
(mod_id >= dbr_pdev_obj->num_modules)) {
|
||||
if (!dbr_pdev_obj->dbr_mod_param) {
|
||||
direct_buf_rx_err("dbr_pdev_obj->dbr_mod_param is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (mod_id >= dbr_pdev_obj->num_modules) {
|
||||
direct_buf_rx_err("Module %d not supported in target", mod_id);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue