On 29/11/2024 10:53, Kryštof Černý via B4 Relay wrote: > /* Detect the 8-port version */ > @@ -505,21 +503,15 @@ static int ds2482_probe(struct i2c_client *client) > err = w1_add_master_device(&data->w1_ch[idx].w1_bm); > if (err) { > data->w1_ch[idx].pdev = NULL; > - goto exit_w1_remove; > + for (idx = 0; idx < data->w1_count; idx++) { > + if (data->w1_ch[idx].pdev != NULL) > + w1_remove_master_device(&data->w1_ch[idx].w1_bm); > + } > + return err; > } > } > > return 0; > - > -exit_w1_remove: > - for (idx = 0; idx < data->w1_count; idx++) { > - if (data->w1_ch[idx].pdev != NULL) > - w1_remove_master_device(&data->w1_ch[idx].w1_bm); This exit path should stay. > - } > -exit_free: > - kfree(data); > -exit: > - return err; > } > Best regards, Krzysztof