Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp520007imm; Wed, 25 Jul 2018 01:06:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcdiAOgAfAXfzAfl2igICjTZk9oeCkiH5f1eJ1DjdiMNZS6ZP0MIiT48uk2xAnW9bTLWFFD X-Received: by 2002:a63:b213:: with SMTP id x19-v6mr19325153pge.393.1532505983328; Wed, 25 Jul 2018 01:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532505983; cv=none; d=google.com; s=arc-20160816; b=lBJCPy3XDQoWVuH1wmjfCWXkislEfmqNSnwazduuUjIjShdMvlbvXwQF6A3LYlZf5f UjmQNpjp7+KrB2Ne/FiKr3KwmenVBNnV35X80Necf7wYbSUbyu8SPiX+H9JXNVHuSMiF WptYSORcs0gFUV8sK4iuihmhmE4S+C9jtVOUaO+FqBlnxYZ9iNA0lhKGzMsSa3AfTBKQ wC/fAQGY99YqngPU0Lexy80WMyWo9lkKMatdnkMyJSWWt6cbBBPupNnqdlxKV4eDjAJo TvVHw5MtluDIVZV1mdn4CBqVmvcY4IoNsoggE7qYG8/orC6fRo2fhN0FsNBr2dN59/Kp NtqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=tPGXO1H05yFO6anYT/j+3CB6rkDxIPDW9pjA0qsOa5E=; b=x9YaMFAOZdFXzTk/XXwolx9Qe94BLn4ThbeP/tIIetXugkD9XXIUxSiUN/OFBY34Re +XRfdzw3BOP4cDRv35pxQYs2/u/RPFzpkyb6DlCLkS31i4Cdfv6w0XCDKym6cSgOjlf1 XHZSbqJnDhKOm1YwDd5tei6WFc3wkfSvhAkPkozDhqiGq7uudQJzk1O4XyCyM41NZ933 vs2DPYN1J1N0vps8LiN6YFYkorrBYYUHsV6lw/CETlccRgOiQcteUCvW5ZRYPtftAUS/ mAEeW5DGf84Bd/uVf6mVeJtfjVIzjCRNHr1zAXPOLhSYWwZyNrpsKn1Zv6HAG5btUW8m zA/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FyD8GVhf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z62-v6si12176961pgz.640.2018.07.25.01.06.07; Wed, 25 Jul 2018 01:06:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FyD8GVhf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728753AbeGYJOb (ORCPT + 99 others); Wed, 25 Jul 2018 05:14:31 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35657 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728502AbeGYJOa (ORCPT ); Wed, 25 Jul 2018 05:14:30 -0400 Received: by mail-wm0-f67.google.com with SMTP id o18-v6so5028825wmc.0 for ; Wed, 25 Jul 2018 01:03:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=tPGXO1H05yFO6anYT/j+3CB6rkDxIPDW9pjA0qsOa5E=; b=FyD8GVhfco+uWFsGtEkemxB7f6Tj6Wwf3X+aQ2pQ9U4OGUVxgK5Y9IMpVZOZho+4P3 bCeCkQHv9faYuZ82U2/bOGZr0ClgQLhdvG+befX4raigyoRubBh6ElCJqHEiCWQ9CtEc TfW1/2ax5U4kneTCgW/ns7U+58H9xyKzpxniw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=tPGXO1H05yFO6anYT/j+3CB6rkDxIPDW9pjA0qsOa5E=; b=UYv5GacmOER9y30gANnzSY3inET3EqMuS6feuck79aOiQTlvy4KnaKwPG3Ytem35mE sji/SD43D7aP4HCLmjBbGhEvnyYyv/cm5dmhsvX2Cb2JZzZKTsvopo2Kqbm0scth2Wv3 aafAblU895szNdznFyRVUdbq3ymknRIyy9qaAD1YaVroOZJd1Wr5jmnWGqATTF44MmvI 3szLiRAfwq6w+jUMhWOv9VX3SoROxTm0Hg2DYboiqleJYtcoYHd/8w9QMeEOLPbCW8Le yoO36jHCKw1qOEM0S1lgjFolyWmlYOtOVg/pP72q4HAjQbcrShLL/F6pfeB1b4HocHX5 /w9Q== X-Gm-Message-State: AOUpUlH3oq/jM64Vsr81v0/UGy400St2XUmbR1CXS8Tord8lD7WR2BzB gvT+qcPHjHBU4fLOfj5qQEQcZw== X-Received: by 2002:a1c:168a:: with SMTP id 132-v6mr4271257wmw.13.1532505838409; Wed, 25 Jul 2018 01:03:58 -0700 (PDT) Received: from dell ([95.149.164.105]) by smtp.gmail.com with ESMTPSA id l16-v6sm3079950wme.36.2018.07.25.01.03.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 01:03:57 -0700 (PDT) Date: Wed, 25 Jul 2018 09:03:55 +0100 From: Lee Jones To: Daniel Thompson Cc: Jingoo Han , Thierry Reding , Bartlomiej Zolnierkiewicz , Marcel Ziswiler , linux-pwm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org Subject: Re: [PATCH v4] backlight: pwm_bl: Fix uninitialized variable Message-ID: <20180725080355.GC5835@dell> References: <20180716210241.9457-1-daniel.thompson@linaro.org> <20180725073830.31421-1-daniel.thompson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180725073830.31421-1-daniel.thompson@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Jul 2018, Daniel Thompson wrote: > Currently, if the DT does not define num-interpolated-steps then > num_steps is undefined and the interpolation code will deploy randomly. > Fix with a simple initialize to zero. > > Fixes: 573fe6d1c25c ("backlight: pwm_bl: Linear interpolation between brightness-levels") > Reported-by: Marcel Ziswiler > Signed-off-by: Daniel Thompson > Tested-by: Marcel Ziswiler > Reviewed-by: Douglas Anderson > Acked-by: Lee Jones > --- > > Notes: > v4: > - Remove line break from Fixes: and update the *-by:s > > v3: > - Switch to the simplest fix and zero the uninitialized variable. git > grep indicates that ~25% of calls to of_property_read_u32() use this > pattern (pre-initialize optional properties with sane values and > ignore the return code). > > v2: > - Simplify SoB chain (with Marcel's permission) > - Separate complex if statement and make other similar calls use same > return code checking approach > - Tidy up comment formatting and fix pre-existing grammar error > > drivers/video/backlight/pwm_bl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog