[lkml]   [2014]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] video: fbdev: uvesafb.c: Added additional error checking
On Wed, Jul 23, 2014 at 11:20:27PM +0200, Rickard Strandqvist wrote:
> Variable was assigned a value that is never used.
> Now the variable is used, and the function returns if a call to
> uvesafb_exec() returns a error.

Because the only user of uvesafb_vbe_getpmi in uvesafb.c
don't check its return value, it should do the check indeed,
so maybe below change is better:

- if ((task->t.regs.eax & 0xffff) != 0x4f || task-> < 0xc000) {
+ if (err || (task->t.regs.eax & 0xffff) != 0x4f || task-> < 0xc000) {
par->pmi_setpal = par->ypan = 0;

Or we check uvesafb_vbe_getpmi's return value, then the code will looks like below:

if (uvesafb_vbe_getpmi(task, par))
par->pmi_setpal = par->ypan = 0;

Add, you should cc all the people who replied your patch
in later patch version.


 \ /
  Last update: 2014-07-24 20:21    [W:0.037 / U:2.240 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site