[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025021314-obsolete-modify-2b96@gregkh>
Date: Thu, 13 Feb 2025 14:23:34 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: André Draszik <andre.draszik@...aro.org>
Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Peter Griffin <peter.griffin@...aro.org>,
Tudor Ambarus <tudor.ambarus@...aro.org>,
Will McVicker <willmcvicker@...gle.com>, kernel-team@...roid.com,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: typec: tcpm/tcpci_maxim: better interrupt name
On Thu, Feb 13, 2025 at 01:10:49PM +0000, André Draszik wrote:
> Thanks Greg,
>
> On Thu, 2025-02-13 at 12:56 +0100, Greg Kroah-Hartman wrote:
> > At a quick glance, tcpci_register_port() is called earlier in the
> > function, but when you error out here you did not call
> > tcpci_unregister_port(). What else needs to also be unwound?
>
> This driver manages everything using devres, including calling of
> tcpci_unregister_port() via devres:
>
> ret = devm_add_action_or_reset(&client->dev,
> max_tcpci_unregister_tcpci_port,
> chip->tcpci);
>
> is done just after tcpci_register_port(). As far as I can see nothing
> needs to be unwound explicitly.
Ugh, that wasn't obvious at all, sorry about that. Yet another reason
to hate devm apis :)
thanks,
greg k-h
Powered by blists - more mailing lists