[COMMON] fimc-is2: fixed a prevent defect(CID214802)
authorEunyoung Lee <ey470.lee@samsung.com>
Tue, 13 Feb 2018 09:27:04 +0000 (18:27 +0900)
committerEunyoung Lee <ey470.lee@samsung.com>
Tue, 19 Jun 2018 08:43:26 +0000 (17:43 +0900)
    - resource leak : CID 214802

Change-Id: I3837c7f092f1e235b5a5e27dbc8b4a493c7e3299
Signed-off-by: Eunyoung Lee <ey470.lee@samsung.com>
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/actuator/fimc-is-actuator-dw9780.c

index 6c210a0017175434a8e0c300780ce20b1c4c276a..08ce96dc007afefb914b1479b9529847d92706ef 100644 (file)
@@ -573,10 +573,10 @@ static int sensor_dw9780_actuator_probe(struct i2c_client *client,
        return ret;
 
 p_err:
-       if (!actuator)
+       if (actuator)
                kzfree(actuator);
 
-       if (!subdev_actuator)
+       if (subdev_actuator)
                kzfree(subdev_actuator);
 
        return ret;