Skip to content

Commit 843fabd

Browse files
andy-shevgregkh
authored andcommitted
usb: typec: intel_pmc_mux: Add missed error check for devm_ioremap_resource()
devm_ioremap_resource() can return an error, add missed check for it. Fixes: 43d596e ("usb: typec: intel_pmc_mux: Check the port status before connect") Reviewed-by: Heikki Krogerus <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1a85b35 commit 843fabd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/usb/typec/mux/intel_pmc_mux.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,11 @@ static int pmc_usb_probe_iom(struct pmc_usb *pmc)
586586
return -ENOMEM;
587587
}
588588

589+
if (IS_ERR(pmc->iom_base)) {
590+
put_device(&adev->dev);
591+
return PTR_ERR(pmc->iom_base);
592+
}
593+
589594
pmc->iom_adev = adev;
590595

591596
return 0;

0 commit comments

Comments
 (0)