From patchwork Thu Aug 27 17:41:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 7086521 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 210DB9F358 for ; Thu, 27 Aug 2015 17:41:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5AF46209C1 for ; Thu, 27 Aug 2015 17:41:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CD26209BC for ; Thu, 27 Aug 2015 17:41:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751708AbbH0RlU (ORCPT ); Thu, 27 Aug 2015 13:41:20 -0400 Received: from seldrel01.sonyericsson.com ([37.139.156.2]:15871 "EHLO seldrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751231AbbH0RlU (ORCPT ); Thu, 27 Aug 2015 13:41:20 -0400 From: Bjorn Andersson To: Milo Kim , Jingoo Han , Lee Jones , Jean-Christophe Plagniol-Villard , Tomi Valkeinen CC: , , Werner Johansson Subject: [PATCH] backlight: lp855x: Make sure props struct is zeroed Date: Thu, 27 Aug 2015 10:41:15 -0700 Message-ID: <1440697275-4469-1-git-send-email-bjorn.andersson@sonymobile.com> X-Mailer: git-send-email 1.8.2.2 MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Werner Johansson The driver occasionally got stuck in suspend mode or other strange states as those parts of the props struct were never initialized. Signed-off-by: Werner Johansson Signed-off-by: Bjorn Andersson Acked-by: Milo Kim --- drivers/video/backlight/lp855x_bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c index 88116b493f3b..0a7f88ce1ab0 100644 --- a/drivers/video/backlight/lp855x_bl.c +++ b/drivers/video/backlight/lp855x_bl.c @@ -282,6 +282,7 @@ static int lp855x_backlight_register(struct lp855x *lp) struct lp855x_platform_data *pdata = lp->pdata; const char *name = pdata->name ? : DEFAULT_BL_NAME; + memset(&props, 0, sizeof(props)); props.type = BACKLIGHT_PLATFORM; props.max_brightness = MAX_BRIGHTNESS;