Merge "msm: ba: avoid system crash in msm_ba_open()"

This commit is contained in:
Linux Build Service Account 2017-11-21 06:44:58 -08:00 committed by Gerrit - the friendly Code Review server
commit f697ab3e51

View file

@ -812,6 +812,11 @@ void *msm_ba_open(const struct msm_ba_ext_ops *ext_ops)
dev_ctxt = get_ba_dev(); dev_ctxt = get_ba_dev();
if (!dev_ctxt) {
dprintk(BA_ERR, "Failed to get ba dev");
return NULL;
}
inst = kzalloc(sizeof(*inst), GFP_KERNEL); inst = kzalloc(sizeof(*inst), GFP_KERNEL);
if (!inst) { if (!inst) {