File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2293,15 +2293,17 @@ void typec_port_register_altmodes(struct typec_port *port,
2293
2293
const struct typec_altmode_ops * ops , void * drvdata ,
2294
2294
struct typec_altmode * * altmodes , size_t n )
2295
2295
{
2296
- struct fwnode_handle * altmodes_node , * child ;
2296
+ struct fwnode_handle * child ;
2297
2297
struct typec_altmode_desc desc ;
2298
2298
struct typec_altmode * alt ;
2299
2299
size_t index = 0 ;
2300
2300
u16 svid ;
2301
2301
u32 vdo ;
2302
2302
int ret ;
2303
2303
2304
- altmodes_node = device_get_named_child_node (& port -> dev , "altmodes" );
2304
+ struct fwnode_handle * altmodes_node __free (fwnode_handle ) =
2305
+ device_get_named_child_node (& port -> dev , "altmodes" );
2306
+
2305
2307
if (!altmodes_node )
2306
2308
return ; /* No altmodes specified */
2307
2309
@@ -2341,7 +2343,6 @@ void typec_port_register_altmodes(struct typec_port *port,
2341
2343
altmodes [index ] = alt ;
2342
2344
index ++ ;
2343
2345
}
2344
- fwnode_handle_put (altmodes_node );
2345
2346
}
2346
2347
EXPORT_SYMBOL_GPL (typec_port_register_altmodes );
2347
2348
You can’t perform that action at this time.
0 commit comments