diff mbox

fbdev: geocode: remove unneeded NULL check

Message ID 1420008938-18423-1-git-send-email-sudipm.mukherjee@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sudip Mukherjee Dec. 31, 2014, 6:55 a.m. UTC
the check for info is not required as we are checking it immediately
after gx1fb_init_fbinfo() and returnig -ENOMEM if it is NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/video/fbdev/geode/gx1fb_core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Tomi Valkeinen Jan. 5, 2015, 12:57 p.m. UTC | #1
On 31/12/14 08:55, Sudip Mukherjee wrote:
> the check for info is not required as we are checking it immediately
> after gx1fb_init_fbinfo() and returnig -ENOMEM if it is NULL.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>  drivers/video/fbdev/geode/gx1fb_core.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/video/fbdev/geode/gx1fb_core.c b/drivers/video/fbdev/geode/gx1fb_core.c
> index 2794ba1..9bee874 100644
> --- a/drivers/video/fbdev/geode/gx1fb_core.c
> +++ b/drivers/video/fbdev/geode/gx1fb_core.c
> @@ -374,10 +374,8 @@ static int gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  		release_mem_region(gx1_gx_base() + 0x8300, 0x100);
>  	}
>  
> -	if (info) {
> -		fb_dealloc_cmap(&info->cmap);
> -		framebuffer_release(info);
> -	}
> +	fb_dealloc_cmap(&info->cmap);
> +	framebuffer_release(info);
>  
>  	return ret;
>  }
> 

Thanks, queued for 3.20.

 Tomi
diff mbox

Patch

diff --git a/drivers/video/fbdev/geode/gx1fb_core.c b/drivers/video/fbdev/geode/gx1fb_core.c
index 2794ba1..9bee874 100644
--- a/drivers/video/fbdev/geode/gx1fb_core.c
+++ b/drivers/video/fbdev/geode/gx1fb_core.c
@@ -374,10 +374,8 @@  static int gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		release_mem_region(gx1_gx_base() + 0x8300, 0x100);
 	}
 
-	if (info) {
-		fb_dealloc_cmap(&info->cmap);
-		framebuffer_release(info);
-	}
+	fb_dealloc_cmap(&info->cmap);
+	framebuffer_release(info);
 
 	return ret;
 }