Re: [PATCH v6 2/2] usb: typec: hd3ss3220: Enable VBUS based on ID pin state

From: Heikki Krogerus

Date: Thu Nov 06 2025 - 05:16:54 EST


> struct regulator *vbus;
>
> vbus = devm_of_regulator_get_optional(...
> if (IS_ERR(vbus) && vbus != ERR_PTR(-ENODEV))
> return PTR_ERR(vbus);
>
> hd3ss3220->vbus = vbus;

Sorry, that has to be:

hd3ss3220->vbus = vbus == ERR_PTR(-ENODEV) ? NULL : vbus;


--
heikki