Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2476c641 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: pd: Assign regulator pointer to NULL if get error code"

parents cefc3ffc a664fac1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2418,6 +2418,7 @@ static int enable_vbus(struct usbpd *pd)
	if (!pd->vbus) {
		pd->vbus = devm_regulator_get(pd->dev.parent, "vbus");
		if (IS_ERR(pd->vbus)) {
			pd->vbus = NULL;
			usbpd_err(&pd->dev, "Unable to get vbus\n");
			return -EAGAIN;
		}