sensorhub: remove unnecessary kfree during driver shutdown 62/31762/1 accepted/tizen/common/20141215.134117 accepted/tizen/mobile/20141216.083708 accepted/tizen/tv/20141217.085627 accepted/tizen/wearable/20141217.085804 submit/tizen/20141215.004633
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 9 Dec 2014 12:53:53 +0000 (21:53 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 9 Dec 2014 12:53:58 +0000 (21:53 +0900)
The ssp_data pointer is allocated with devm_kzalloc, so freeing it
is not necessary.

Change-Id: Idd26ba71e9c343d61e7b5aa01b21a2f2c3ae9b00
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/sensorhub/stm/ssp_dev.c

index b488219..42df17b 100644 (file)
@@ -543,7 +543,7 @@ static void ssp_shutdown(struct spi_device *spi)
 
        func_dbg();
        if (data->bProbeIsDone == false)
-               goto exit;
+               return;
 
        if (data->fw_dl_state >= FW_DL_STATE_SCHEDULED &&
                data->fw_dl_state < FW_DL_STATE_DONE) {
@@ -586,8 +586,6 @@ static void ssp_shutdown(struct spi_device *spi)
 #endif
        toggle_mcu_reset(data);
        ssp_info(" done\n");
-exit:
-       kfree(data);
 }
 
 #ifdef CONFIG_HAS_EARLYSUSPEND