staging: sm750fb: simplify return
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Fri, 7 Aug 2015 12:04:06 +0000 (17:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Aug 2015 22:12:54 +0000 (15:12 -0700)
Lets return the return value directly instead of using a variable to
store the result.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750.c

index e7fad0f2cdf8a588f851bba80cde87980f5408e2..07f8afd2defeb82da3b0f7fa502c2ffc661d666e 100644 (file)
@@ -298,17 +298,13 @@ static int lynxfb_ops_pan_display(struct fb_var_screeninfo *var,
 {
        struct lynxfb_par *par;
        struct lynxfb_crtc *crtc;
-       int ret;
 
        if (!info)
                return -EINVAL;
 
-       ret = 0;
        par = info->par;
        crtc = &par->crtc;
-       ret = crtc->proc_panDisplay(crtc, var, info);
-
-       return ret;
+       return crtc->proc_panDisplay(crtc, var, info);
 }
 
 static int lynxfb_ops_set_par(struct fb_info *info)