* [PATCH] bus: mhi: core: Fix null pointer access
@ 2020-10-27 5:33 carl.yin
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
0 siblings, 1 reply; 2+ messages in thread
From: carl.yin @ 2020-10-27 5:33 UTC (permalink / raw)
To: manivannan.sadhasivam, hemantk, sfr
Cc: linux-arm-msm, linux-kernel, carl.yin, naveen.kumar
From: carl <carl.yin@quectel.com>
function parse_ev_cfg and parse_ch_cfg access mhi_cntrl->mhi_dev
before it is set in function mhi_register_controller,
use cntrl_dev to instead mhi_dev.
Signed-off-by: carl <carl.yin@quectel.com>
---
drivers/bus/mhi/core/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c
index 0ffdebde8..c6b43e90b 100644
--- a/drivers/bus/mhi/core/init.c
+++ b/drivers/bus/mhi/core/init.c
@@ -610,7 +610,7 @@ static int parse_ev_cfg(struct mhi_controller *mhi_cntrl,
{
struct mhi_event *mhi_event;
const struct mhi_event_config *event_cfg;
- struct device *dev = &mhi_cntrl->mhi_dev->dev;
+ struct device *dev = mhi_cntrl->cntrl_dev;
int i, num;
num = config->num_events;
@@ -692,7 +692,7 @@ static int parse_ch_cfg(struct mhi_controller *mhi_cntrl,
const struct mhi_controller_config *config)
{
const struct mhi_channel_config *ch_cfg;
- struct device *dev = &mhi_cntrl->mhi_dev->dev;
+ struct device *dev = mhi_cntrl->cntrl_dev;
int i;
u32 chan;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bus: mhi: core: Fix null pointer access
2020-10-27 5:33 [PATCH] bus: mhi: core: Fix null pointer access carl.yin
@ 2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2020-12-29 20:15 UTC (permalink / raw)
To: =?utf-8?b?Q2FybCBZaW4o5q635byg5oiQKSA8Y2FybC55aW5AcXVlY3RlbC5jb20+?=
Cc: linux-arm-msm
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
On Tue, 27 Oct 2020 13:33:10 +0800 you wrote:
> From: carl <carl.yin@quectel.com>
>
> function parse_ev_cfg and parse_ch_cfg access mhi_cntrl->mhi_dev
> before it is set in function mhi_register_controller,
> use cntrl_dev to instead mhi_dev.
>
> Signed-off-by: carl <carl.yin@quectel.com>
>
> [...]
Here is the summary with links:
- bus: mhi: core: Fix null pointer access
https://git.kernel.org/qcom/c/f4d0b39c8425
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-29 20:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 5:33 [PATCH] bus: mhi: core: Fix null pointer access carl.yin
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).