linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Chuhong Yuan <hslester96@gmail.com>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-geode@lists.infradead.org
Cc: Andrew Morton <akpm@osdl.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	linux-kernel@vger.kernel.org, Adrian Bunk <bunk@stusta.de>,
	Andres Salomon <dilinger@queued.net>,
	David Vrabel <dvrabel@arcom.com>
Subject: Re: [PATCH] fbdev: geocode: Add the missed pci_disable_device() in gx1fb_map_video_memory()
Date: Wed, 03 Jun 2020 16:48:31 +0000	[thread overview]
Message-ID: <4bec4498-05a2-9ec5-8b91-7934d05ded68@web.de> (raw)
In-Reply-To: <20200603092547.1424428-1-hslester96@gmail.com>

> 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

  reply	other threads:[~2020-06-03 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03  9:25 [PATCH] fbdev: geocode: Add the missed pci_disable_device() for gx1fb_map_video_memory() Chuhong Yuan
2020-06-03 16:48 ` Markus Elfring [this message]
2020-06-04  8:22 ` Pekka Paalanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bec4498-05a2-9ec5-8b91-7934d05ded68@web.de \
    --to=markus.elfring@web.de \
    --cc=akpm@osdl.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=bunk@stusta.de \
    --cc=dilinger@queued.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=dvrabel@arcom.com \
    --cc=hslester96@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-geode@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).