From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Skip pixel multiplier x-check if we fail to send the command Date: Thu, 11 Jul 2013 21:52:33 +0200 Message-ID: <20130711195233.GX6143@phenom.ffwll.local> References: <1373568360-12566-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com [74.125.83.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 705DAE6616 for ; Thu, 11 Jul 2013 12:52:31 -0700 (PDT) Received: by mail-ee0-f46.google.com with SMTP id d41so5685947eek.19 for ; Thu, 11 Jul 2013 12:52:30 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1373568360-12566-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Damien Lespiau Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Jul 11, 2013 at 07:46:00PM +0100, Damien Lespiau wrote: > If intel_sdvo_get_value() fails here, val is unitialized and the cross > check won't check anything. > > Signed-off-by: Damien Lespiau > --- > drivers/gpu/drm/i915/intel_sdvo.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c > index b8e1623..4481f6a 100644 > --- a/drivers/gpu/drm/i915/intel_sdvo.c > +++ b/drivers/gpu/drm/i915/intel_sdvo.c > @@ -1357,7 +1357,10 @@ static void intel_sdvo_get_config(struct intel_encoder *encoder, > } > > /* Cross check the port pixel multiplier with the sdvo encoder state. */ > - intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_CLOCK_RATE_MULT, &val, 1); > + if (!intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_CLOCK_RATE_MULT, > + &val, 1)) > + return; But now it fails silently instead of being paranoid ... Can we just shut up the tool instead? -Daniel > + > switch (val) { > case SDVO_CLOCK_RATE_MULT_1X: > encoder_pixel_multiplier = 1; > -- > 1.8.3.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch