* Re: [PATCH] fbdev: geocode: Add the missed pci_disable_device() in gx1fb_map_video_memory()
@ 2020-06-03 16:48 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2020-06-03 16:48 UTC (permalink / raw)
To: Chuhong Yuan, dri-devel, linux-fbdev, linux-geode
Cc: Andrew Morton, Bartlomiej Zolnierkiewicz, Adrian Bunk,
Andres Salomon, David Vrabel, James Simmons, linux-kernel
> 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-03 16:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03 16:48 [PATCH] fbdev: geocode: Add the missed pci_disable_device() in gx1fb_map_video_memory() Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).