Skip to content

Commit 1ea34b2

Browse files
Wei Yongjungregkh
authored andcommitted
bus: mhi: core: Fix some error return code
Fix to return negative error code from the error handling case instead of 0 in mhi_init_dev_ctxt() and mhi_driver_probe(). Fixes: 3000f85 ("bus: mhi: core: Add support for basic PM operations") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1333174 commit 1ea34b2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/bus/mhi/core/init.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ int mhi_init_dev_ctxt(struct mhi_controller *mhi_cntrl)
291291
}
292292

293293
/* Setup cmd context */
294+
ret = -ENOMEM;
294295
mhi_ctxt->cmd_ctxt = mhi_alloc_coherent(mhi_cntrl,
295296
sizeof(*mhi_ctxt->cmd_ctxt) *
296297
NR_OF_CMD_RINGS,
@@ -1100,6 +1101,7 @@ static int mhi_driver_probe(struct device *dev)
11001101
}
11011102
}
11021103

1104+
ret = -EINVAL;
11031105
if (dl_chan) {
11041106
/*
11051107
* If channel supports LPM notifications then status_cb should

0 commit comments

Comments
 (0)