<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 28, 2016 at 7:08 PM, Ilia Mirkin <span dir="ltr"><<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Jan 28, 2016 at 7:09 PM, Insu Yun <<a href="mailto:wuninsu@gmail.com">wuninsu@gmail.com</a>> wrote:<br>
> drm_property_create_range can be failed in memory pressure.<br>
> So, it needs to be handled.<br>
><br>
> Signed-off-by: Insu Yun <<a href="mailto:wuninsu@gmail.com">wuninsu@gmail.com</a>><br>
> ---<br>
> drivers/gpu/drm/nouveau/nouveau_display.c | 6 ++++++<br>
> 1 file changed, 6 insertions(+)<br>
><br>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c<br>
> index 24be27d..26b4902 100644<br>
> --- a/drivers/gpu/drm/nouveau/nouveau_display.c<br>
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c<br>
> @@ -443,6 +443,12 @@ nouveau_display_create_properties(struct drm_device *dev)<br>
> /* -100..+100 */<br>
> disp->color_vibrance_property =<br>
> drm_property_create_range(dev, 0, "color vibrance", 0, 200);<br>
> +<br>
> + if (!disp->underscan_hborder_property ||<br>
> + !disp->underscan_vborder_property ||<br>
> + !disp->vibrant_hue_property ||<br>
> + !disp->color_vibrance_property)<br>
> + return;<br>
<br>
</span>Aren't we at the end of the function anyways?<br></blockquote><div><br></div><div>Sorry. it is not perfect patch </div><div>I found this by my static analyzer.</div><div>I have limited knowledge about this driver.</div><div>I don't want to mass up your driver.</div><div>What I want to do is to tell you there is a bug.</div><div>I think we need to return error to caller.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> }<br>
><br>
> int<br>
<span class="HOEnZb"><font color="#888888">> --<br>
> 1.9.1<br>
><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div>Regards</div>
<div>Insu Yun</div></div>
</div></div>