TF_CHECK_PARMS2(parms, parms->rm_db);
rm_db = (struct tf_rm_new_db *)parms->rm_db;
+ if (!rm_db->db)
+ return -EINVAL;
cfg_type = rm_db->db[parms->db_index].cfg_type;
/* Bail out if not controlled by RM */
TF_CHECK_PARMS2(parms, parms->rm_db);
rm_db = (struct tf_rm_new_db *)parms->rm_db;
+ if (!rm_db->db)
+ return -EINVAL;
cfg_type = rm_db->db[parms->db_index].cfg_type;
/* Bail out if not controlled by RM */
TF_CHECK_PARMS2(parms, parms->rm_db);
rm_db = (struct tf_rm_new_db *)parms->rm_db;
+ if (!rm_db->db)
+ return -EINVAL;
cfg_type = rm_db->db[parms->db_index].cfg_type;
/* Bail out if not controlled by RM */
TF_CHECK_PARMS2(parms, parms->rm_db);
rm_db = (struct tf_rm_new_db *)parms->rm_db;
+ if (!rm_db->db)
+ return -EINVAL;
cfg_type = rm_db->db[parms->db_index].cfg_type;
/* Bail out if not controlled by HCAPI */
TF_CHECK_PARMS2(parms, parms->rm_db);
rm_db = (struct tf_rm_new_db *)parms->rm_db;
+ if (!rm_db->db)
+ return -EINVAL;
cfg_type = rm_db->db[parms->db_index].cfg_type;
/* Bail out if not controlled by HCAPI */
TF_CHECK_PARMS2(parms, parms->rm_db);
rm_db = (struct tf_rm_new_db *)parms->rm_db;
+ if (!rm_db->db)
+ return -EINVAL;
cfg_type = rm_db->db[parms->db_index].cfg_type;
/* Bail out if not controlled by RM */
TF_CHECK_PARMS2(parms, parms->rm_db);
rm_db = (struct tf_rm_new_db *)parms->rm_db;
+ if (!rm_db->db)
+ return -EINVAL;
cfg_type = rm_db->db[parms->db_index].cfg_type;
/* Bail out if not controlled by RM */