mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-26 16:28:12 +00:00
kvm tools: Clean up NULL check in pci_shmem__init()
Use idiomatic way of checking for NULL pointer in pci_shmem__init(). Suggested-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
6ad7171a69
commit
10a266cae3
+1
-1
@@ -54,7 +54,7 @@ static struct msix_table msix_table[2];
|
||||
|
||||
int pci_shmem__register_mem(struct shmem_info *si)
|
||||
{
|
||||
if (shmem_region == NULL) {
|
||||
if (!shmem_region) {
|
||||
shmem_region = si;
|
||||
} else {
|
||||
pr_warning("only single shmem currently avail. ignoring.\n");
|
||||
|
||||
Reference in New Issue
Block a user