Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bus: mhi: host: Do not use uninitialized 'dev' pointer in mhi_init_irq_setup()

In mhi_init_irq_setup, the device pointer used for dev_err() was not
initialized. Use the pointer from mhi_cntrl instead.

Fixes: b0fc0167f254 ("bus: mhi: core: Allow shared IRQ for event rings")
Fixes: 3000f85b8f47 ("bus: mhi: core: Add support for basic PM operations")
Signed-off-by: Adam Xue <zxue@semtech.com>
[mani: reworded subject/description and CCed stable]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reviewed-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20250905174118.38512-1-zxue@semtech.com

authored by

Adam Xue and committed by
Manivannan Sadhasivam
d0856a6d 376358bb

+2 -3
+2 -3
drivers/bus/mhi/host/init.c
··· 194 194 static int mhi_init_irq_setup(struct mhi_controller *mhi_cntrl) 195 195 { 196 196 struct mhi_event *mhi_event = mhi_cntrl->mhi_event; 197 - struct device *dev = &mhi_cntrl->mhi_dev->dev; 198 197 unsigned long irq_flags = IRQF_SHARED | IRQF_NO_SUSPEND; 199 198 int i, ret; 200 199 ··· 220 221 continue; 221 222 222 223 if (mhi_event->irq >= mhi_cntrl->nr_irqs) { 223 - dev_err(dev, "irq %d not available for event ring\n", 224 + dev_err(mhi_cntrl->cntrl_dev, "irq %d not available for event ring\n", 224 225 mhi_event->irq); 225 226 ret = -EINVAL; 226 227 goto error_request; ··· 231 232 irq_flags, 232 233 "mhi", mhi_event); 233 234 if (ret) { 234 - dev_err(dev, "Error requesting irq:%d for ev:%d\n", 235 + dev_err(mhi_cntrl->cntrl_dev, "Error requesting irq:%d for ev:%d\n", 235 236 mhi_cntrl->irq[mhi_event->irq], i); 236 237 goto error_request; 237 238 }