Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6049a7a2 authored by Markus Elfring's avatar Markus Elfring Committed by Tomi Valkeinen
Browse files

video: fbdev-SIS: Deletion of unnecessary checks before the function call "pci_dev_put"



The pci_dev_put() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call
is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 2daff4d4
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -5989,7 +5989,7 @@ static int sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

	if(!ivideo->sisvga_enabled) {
		if(pci_enable_device(pdev)) {
			if(ivideo->nbridge) pci_dev_put(ivideo->nbridge);
			pci_dev_put(ivideo->nbridge);
			framebuffer_release(sis_fb_info);
			return -EIO;
		}
@@ -6202,9 +6202,7 @@ error_0: iounmap(ivideo->video_vbase);
error_1:	release_mem_region(ivideo->video_base, ivideo->video_size);
error_2:	release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
error_3:	vfree(ivideo->bios_abase);
		if(ivideo->lpcdev)
		pci_dev_put(ivideo->lpcdev);
		if(ivideo->nbridge)
		pci_dev_put(ivideo->nbridge);
		if(!ivideo->sisvga_enabled)
			pci_disable_device(pdev);
@@ -6505,10 +6503,8 @@ static void sisfb_remove(struct pci_dev *pdev)

	vfree(ivideo->bios_abase);

	if(ivideo->lpcdev)
	pci_dev_put(ivideo->lpcdev);

	if(ivideo->nbridge)
	pci_dev_put(ivideo->nbridge);

#ifdef CONFIG_MTRR