Message ID | 20210607205007.71458-2-andy.shevchenko@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 843fabdd7623271330af07f1b7fbd7fabe33c8de |
Headers | show |
Series | [v2,1/3] usb: typec: intel_pmc_mux: Put fwnode in error case during ->probe() | expand |
diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c index 221aa1c0e77a..34e1662ad6ef 100644 --- a/drivers/usb/typec/mux/intel_pmc_mux.c +++ b/drivers/usb/typec/mux/intel_pmc_mux.c @@ -604,6 +604,11 @@ static int pmc_usb_probe_iom(struct pmc_usb *pmc) return -ENOMEM; } + if (IS_ERR(pmc->iom_base)) { + put_device(&adev->dev); + return PTR_ERR(pmc->iom_base); + } + pmc->iom_adev = adev; return 0;