From: Hwankyu Jhun Date: Tue, 13 Oct 2020 06:45:12 +0000 (+0900) Subject: Prevent duplicate initialization of sensor X-Git-Tag: submit/tizen/20201027.014125~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F09%2F245609%2F1;p=platform%2Fcore%2Fappfw%2Famd.git Prevent duplicate initialization of sensor To prevent duplicate initialization, this patch adds an exception handling to check whether the initialized flag is true or NOT. Change-Id: If8d38e6ffd3570e9ffa25a4f0745de479d549d8a Signed-off-by: Hwankyu Jhun --- diff --git a/src/modules/splash-screen/src/splash-screen.c b/src/modules/splash-screen/src/splash-screen.c index a0f9df8d..29768a2b 100644 --- a/src/modules/splash-screen/src/splash-screen.c +++ b/src/modules/splash-screen/src/splash-screen.c @@ -627,6 +627,9 @@ static int __init_rotation(void) return 0; } + if (rotation.initialized) + return 0; + if (!rotation.sensor) { rotation.sensor = sensord_get_sensor(AUTO_ROTATION_SENSOR); if (!rotation.sensor) {