diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-09-04 08:35:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-26 11:44:40 -0400 |
commit | 6d3e0d0c1ca926fd6ab557fcd5efb171148f43d6 (patch) | |
tree | 6177acff20ec3617a5de3cfee4ad39722261f7d9 /drivers/char/hpet.c | |
parent | d396034aa860e7aaade347a535e831a4307037d3 (diff) |
hpet: remove useless check if fixmem32 is NULL
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@infradead.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r-- | drivers/char/hpet.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 448ce5e29c56..c8f43295d42a 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) | |||
971 | struct acpi_resource_fixed_memory32 *fixmem32; | 971 | struct acpi_resource_fixed_memory32 *fixmem32; |
972 | 972 | ||
973 | fixmem32 = &res->data.fixed_memory32; | 973 | fixmem32 = &res->data.fixed_memory32; |
974 | if (!fixmem32) | ||
975 | return AE_NO_MEMORY; | ||
976 | 974 | ||
977 | hdp->hd_phys_address = fixmem32->address; | 975 | hdp->hd_phys_address = fixmem32->address; |
978 | hdp->hd_address = ioremap(fixmem32->address, | 976 | hdp->hd_address = ioremap(fixmem32->address, |