From: Chris Wilson Subject: Re: [Intel-gfx] [PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value Date: Sun, 23 Oct 2016 18:22:01 +0100 Message-ID: <20161023172201.GA19601@nuc-i3427.alporthouse.com> References: <20160904185809.31916-1-nicolas.iooss_linux@m4x.org> <8ebf69c1-2e57-4a67-f392-346d54741826@m4x.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <8ebf69c1-2e57-4a67-f392-346d54741826@m4x.org> Sender: linux-kernel-owner@vger.kernel.org To: Nicolas Iooss Cc: Daniel Vetter , Jani Nikula , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org On Sun, Oct 23, 2016 at 06:55:58PM +0200, Nicolas Iooss wrote: > Hello, > > I sent the patch below a few weeks ago. I got some comments (cf. [1]) > which looked good, but the patch has not been merged in linux-next yet. > Do I need to fix something (like rewrite the commit message) in order to > get it merged? It basically boils down to that you said it doesn't fix a bug, but shuts up a non-default compiler using custom warning flags. But there is a bug in that code, as mipi_dsi_dcs_read() may return an error value, which may just be ENOMEM, but if it did we would return the garbage. Not only should we fix the error handling here, but you also need to fix the error handling in drivers/video/backlight/backlight.c as despite many callees returning an error, it assumes that bd->ops->get_brightness() never returns an error... -Chris -- Chris Wilson, Intel Open Source Technology Centre