[Intel-gfx] [PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value
Chris Wilson
chris at chris-wilson.co.uk
Sun Oct 23 17:22:01 UTC 2016
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
More information about the dri-devel
mailing list