File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,11 @@ static int w1_gpio_probe(struct platform_device *pdev)
76
76
enum gpiod_flags gflags = GPIOD_OUT_LOW_OPEN_DRAIN ;
77
77
int err ;
78
78
79
+ master = devm_kzalloc (dev , sizeof (struct w1_bus_master ),
80
+ GFP_KERNEL );
81
+ if (!master )
82
+ return - ENOMEM ;
83
+
79
84
if (of_have_populated_dt ()) {
80
85
pdata = devm_kzalloc (& pdev -> dev , sizeof (* pdata ), GFP_KERNEL );
81
86
if (!pdata )
@@ -102,11 +107,6 @@ static int w1_gpio_probe(struct platform_device *pdev)
102
107
return - ENXIO ;
103
108
}
104
109
105
- master = devm_kzalloc (dev , sizeof (struct w1_bus_master ),
106
- GFP_KERNEL );
107
- if (!master )
108
- return - ENOMEM ;
109
-
110
110
pdata -> gpiod = devm_gpiod_get_index (dev , NULL , 0 , gflags );
111
111
if (IS_ERR (pdata -> gpiod )) {
112
112
dev_err (dev , "gpio_request (pin) failed\n" );
You can’t perform that action at this time.
0 commit comments