Skip to content

Commit b7cc8c1

Browse files
committed
Fixed issue #22, memory leak in optoe_probe.
1 parent 3ef1e9f commit b7cc8c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

optoe/optoe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ static int optoe_probe(struct i2c_client *client,
899899
optoe->byte_len = ONE_ADDR_EEPROM_SIZE;
900900
} else { /* those were the only choices */
901901
err = -EINVAL;
902-
goto exit;
902+
goto err_struct;
903903
}
904904

905905
/*
@@ -917,7 +917,7 @@ static int optoe_probe(struct i2c_client *client,
917917
regmap = optoe_make_regmap(client);
918918
if (IS_ERR(regmap)) {
919919
err = PTR_ERR(regmap);
920-
goto exit;
920+
goto err_struct;
921921
}
922922

923923
optoe->optoe_client.client = client;

0 commit comments

Comments
 (0)