mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
mhi: core: Fix missing return value check
sysfs_create_group() and mhi_read_reg_field() APIs expect to check the return value. Add return check to fix compilation error. Change-Id: I0a8249cd6b87eba51c130add97098de6cafbc908 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
parent
7e01cae53b
commit
9bf568586c
2 changed files with 16 additions and 5 deletions
|
|
@ -325,10 +325,19 @@ static const struct attribute_group mhi_sysfs_group = {
|
|||
|
||||
void mhi_create_sysfs(struct mhi_controller *mhi_cntrl)
|
||||
{
|
||||
sysfs_create_group(&mhi_cntrl->mhi_dev->dev.kobj, &mhi_sysfs_group);
|
||||
if (mhi_cntrl->mhi_tsync)
|
||||
sysfs_create_group(&mhi_cntrl->mhi_dev->dev.kobj,
|
||||
int ret;
|
||||
|
||||
ret = sysfs_create_group(&mhi_cntrl->mhi_dev->dev.kobj,
|
||||
&mhi_sysfs_group);
|
||||
if (ret)
|
||||
MHI_CNTRL_LOG("Failed to create mhi_sysfs_group");
|
||||
|
||||
if (mhi_cntrl->mhi_tsync) {
|
||||
ret = sysfs_create_group(&mhi_cntrl->mhi_dev->dev.kobj,
|
||||
&mhi_tsync_group);
|
||||
if (ret)
|
||||
MHI_CNTRL_LOG("Failed to create mhi_tsync_group");
|
||||
}
|
||||
}
|
||||
|
||||
void mhi_destroy_sysfs(struct mhi_controller *mhi_cntrl)
|
||||
|
|
|
|||
|
|
@ -1717,16 +1717,18 @@ irqreturn_t mhi_intvec_handlr(int irq_number, void *dev)
|
|||
|
||||
struct mhi_controller *mhi_cntrl = dev;
|
||||
u32 in_reset = -1;
|
||||
int ret = 0;
|
||||
|
||||
/* wake up any events waiting for state change */
|
||||
MHI_VERB("Enter\n");
|
||||
if (unlikely(mhi_cntrl->initiate_mhi_reset)) {
|
||||
mhi_read_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
|
||||
ret = mhi_read_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
|
||||
MHICTRL_RESET_MASK, MHICTRL_RESET_SHIFT, &in_reset);
|
||||
|
||||
mhi_cntrl->initiate_mhi_reset = !!in_reset;
|
||||
}
|
||||
wake_up_all(&mhi_cntrl->state_event);
|
||||
MHI_VERB("Exit\n");
|
||||
MHI_VERB("Exit: ret %d\n", ret);
|
||||
|
||||
if (MHI_IN_MISSION_MODE(mhi_cntrl->ee))
|
||||
queue_work(mhi_cntrl->wq, &mhi_cntrl->special_work);
|
||||
|
|
|
|||
Loading…
Reference in a new issue