lkml.org 
[lkml]   [2020]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] fbdev: geocode: Add the missed pci_disable_device() in gx1fb_map_video_memory()
From
Date
> Add the missed function call to fix the bug.


> +++ b/drivers/video/fbdev/geode/gx1fb_core.c
> @@ -208,29 +208,44 @@ static int gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev)

> return 0;
> +
> +err:
> + pci_disable_device(dev);
> + return ret;
> }


I suggest to use more descriptive labels so that the exception handling
can be improved accordingly.

return 0;
+
+e_nomem:
+ ret = -ENOMEM;
+disable_device:
+ pci_disable_device(dev);
+ return ret;
}


Regards,
Markus

\
 
 \ /
  Last update: 2020-06-03 18:50    [W:0.026 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site