dlkm: leds_aw99703: free gpio if init failed

dlkm/leds_aw99703:
Free gpio if init failed, otherwise other modules can't request
this gpio again.

Change-Id: I0cfcde5156651c298d24b6debde468593efe48d6
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1958088
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ying Xu <xuying9@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wangyq13 2021-05-24 16:31:14 +08:00 • committed by Yeqing Wang
commit 0213be45da

View file

@ -733,6 +733,7 @@ static int aw99703_probe(struct i2c_client *client,
err_sysfs:
err_init:
gpio_free(drvdata->hwen_gpio);
kfree(drvdata);
err_out:
return err;