mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge branch 'fix/ctxfi' into topic/ctxfi
This commit is contained in:
commit
89e1b9511f
@ -242,13 +242,12 @@ static int get_amixer_rsc(struct amixer_mgr *mgr,
|
|||||||
|
|
||||||
/* Allocate mem for amixer resource */
|
/* Allocate mem for amixer resource */
|
||||||
amixer = kzalloc(sizeof(*amixer), GFP_KERNEL);
|
amixer = kzalloc(sizeof(*amixer), GFP_KERNEL);
|
||||||
if (NULL == amixer) {
|
if (!amixer)
|
||||||
err = -ENOMEM;
|
return -ENOMEM;
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check whether there are sufficient
|
/* Check whether there are sufficient
|
||||||
* amixer resources to meet request. */
|
* amixer resources to meet request. */
|
||||||
|
err = 0;
|
||||||
spin_lock_irqsave(&mgr->mgr_lock, flags);
|
spin_lock_irqsave(&mgr->mgr_lock, flags);
|
||||||
for (i = 0; i < desc->msr; i++) {
|
for (i = 0; i < desc->msr; i++) {
|
||||||
err = mgr_get_resource(&mgr->mgr, 1, &idx);
|
err = mgr_get_resource(&mgr->mgr, 1, &idx);
|
||||||
@ -397,12 +396,11 @@ static int get_sum_rsc(struct sum_mgr *mgr,
|
|||||||
|
|
||||||
/* Allocate mem for sum resource */
|
/* Allocate mem for sum resource */
|
||||||
sum = kzalloc(sizeof(*sum), GFP_KERNEL);
|
sum = kzalloc(sizeof(*sum), GFP_KERNEL);
|
||||||
if (NULL == sum) {
|
if (!sum)
|
||||||
err = -ENOMEM;
|
return -ENOMEM;
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check whether there are sufficient sum resources to meet request. */
|
/* Check whether there are sufficient sum resources to meet request. */
|
||||||
|
err = 0;
|
||||||
spin_lock_irqsave(&mgr->mgr_lock, flags);
|
spin_lock_irqsave(&mgr->mgr_lock, flags);
|
||||||
for (i = 0; i < desc->msr; i++) {
|
for (i = 0; i < desc->msr; i++) {
|
||||||
err = mgr_get_resource(&mgr->mgr, 1, &idx);
|
err = mgr_get_resource(&mgr->mgr, 1, &idx);
|
||||||
|
@ -724,12 +724,11 @@ static int get_srcimp_rsc(struct srcimp_mgr *mgr,
|
|||||||
|
|
||||||
/* Allocate mem for SRCIMP resource */
|
/* Allocate mem for SRCIMP resource */
|
||||||
srcimp = kzalloc(sizeof(*srcimp), GFP_KERNEL);
|
srcimp = kzalloc(sizeof(*srcimp), GFP_KERNEL);
|
||||||
if (NULL == srcimp) {
|
if (!srcimp)
|
||||||
err = -ENOMEM;
|
return -ENOMEM;
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check whether there are sufficient SRCIMP resources. */
|
/* Check whether there are sufficient SRCIMP resources. */
|
||||||
|
err = 0;
|
||||||
spin_lock_irqsave(&mgr->mgr_lock, flags);
|
spin_lock_irqsave(&mgr->mgr_lock, flags);
|
||||||
for (i = 0; i < desc->msr; i++) {
|
for (i = 0; i < desc->msr; i++) {
|
||||||
err = mgr_get_resource(&mgr->mgr, 1, &idx);
|
err = mgr_get_resource(&mgr->mgr, 1, &idx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user