[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <52488D5A.6010504@ladisch.de>
Date: Sun, 29 Sep 2013 22:28:10 +0200
From: Clemens Ladisch <clemens@...isch.de>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: Tomas Winkler <tomas.winkler@...el.com>,
Randy Dunlap <rdunlap@...radead.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH] hpet: remove useless check if fixmem32 is NULL
From: Tomas Winkler <tomas.winkler@...el.com>
fixmem32 is assigned to address of res->data member
so the address is always valid
Actually since we are not checking for res != NULL
static analyzing is complaining about referencing the pointer
and consequent check for null.
The code snippet looks confusing also for human eyes.
Cc: Randy Dunlap <rdunlap@...radead.org>
Signed-off-by: Tomas Winkler <tomas.winkler@...el.com>
Signed-off-by: Clemens Ladisch <clemens@...isch.de>
---
drivers/char/hpet.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index ab8651d..d6568a6 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -971,8 +971,6 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
struct acpi_resource_fixed_memory32 *fixmem32;
fixmem32 = &res->data.fixed_memory32;
- if (!fixmem32)
- return AE_NO_MEMORY;
hdp->hd_phys_address = fixmem32->address;
hdp->hd_address = ioremap(fixmem32->address,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists