Hi,
On Tue, Feb 05, 2019 at 01:03:58AM +0000, Ajay Gupta wrote:
> > @@ -412,6 +424,12 @@ static void ucsi_unregister_altmodes(struct
> > ucsi_connector *con, u8 recipient)
> > }
> >
> > while (adev[i]) {
> > + if (recipient == UCSI_RECIPIENT_SOP &&
> > + adev[i]->svid == USB_TYPEC_DP_SID) {
> > + alt = typec_match_altmode(con->port_altmode, -1,
> > + USB_TYPEC_DP_SID, 1);
> > + ucsi_displayport_remove_partner(alt);
> "alt" may be null here in cases where attached type-C device has DP alt mode
> which is not supported
> by connector. Please change as
> If (alt)
> ucsi_displayport_remove_partner(alt);
That should not be necessary. Check ucsi_displayport_remove_partner().
I put a condition there if (!alt) return;
thanks,
--
heikki