File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -712,31 +712,29 @@ struct clk_hw *imx_clk_scu_alloc_dev(const char *name,
712
712
}
713
713
714
714
ret = platform_device_add_data (pdev , & clk , sizeof (clk ));
715
- if (ret ) {
716
- platform_device_put (pdev );
717
- return ERR_PTR (ret );
718
- }
715
+ if (ret )
716
+ goto put_device ;
719
717
720
718
ret = driver_set_override (& pdev -> dev , & pdev -> driver_override ,
721
719
"imx-scu-clk" , strlen ("imx-scu-clk" ));
722
- if (ret ) {
723
- platform_device_put (pdev );
724
- return ERR_PTR (ret );
725
- }
720
+ if (ret )
721
+ goto put_device ;
726
722
727
723
ret = imx_clk_scu_attach_pd (& pdev -> dev , rsrc_id );
728
724
if (ret )
729
725
pr_warn ("%s: failed to attached the power domain %d\n" ,
730
726
name , ret );
731
727
732
728
ret = platform_device_add (pdev );
733
- if (ret ) {
734
- platform_device_put (pdev );
735
- return ERR_PTR (ret );
736
- }
729
+ if (ret )
730
+ goto put_device ;
737
731
738
732
/* For API backwards compatiblilty, simply return NULL for success */
739
733
return NULL ;
734
+
735
+ put_device :
736
+ platform_device_put (pdev );
737
+ return ERR_PTR (ret );
740
738
}
741
739
742
740
void imx_clk_scu_unregister (void )
You can’t perform that action at this time.
0 commit comments