Thread (5 messages) 5 messages, 3 authors, 2016-10-26

Re: [PATCH 11/13] ALSA: Deletion of checks before the function call "iounmap"

From: Dan Carpenter <hidden>
Date: 2015-01-05 14:00:36
Also in: alsa-devel, kernel-janitors, lkml

On Sun, Jan 04, 2015 at 02:36:01PM +0100, SF Markus Elfring wrote:
 	/* unmap PCI memory space, mapped during device init. */
-	for (idx = 0; idx < HPI_MAX_ADAPTER_MEM_SPACES; idx++) {
-		if (pci.ap_mem_base[idx])
-			iounmap(pci.ap_mem_base[idx]);
-	}
+	for (idx = 0; idx < HPI_MAX_ADAPTER_MEM_SPACES; ++idx)
+		iounmap(pci.ap_mem_base[idx]);
 
Don't do the gratuitous idx++ to ++idx changes.  You do it a couple
other places as well.  It belongs in a separate patch if you really feel
it is worth doing.  (It is not a clean up and it is not worth doing).

regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help