* [char-misc-next] hpet: remove useless check if fixmem32 is NULL
@ 2013-09-04 12:35 Tomas Winkler
2013-09-29 20:28 ` [PATCH] " Clemens Ladisch
0 siblings, 1 reply; 2+ messages in thread
From: Tomas Winkler @ 2013-09-04 12:35 UTC (permalink / raw)
To: gregkh; +Cc: arnd, linux-kernel, linux-acpi, Tomas Winkler, Randy Dunlap
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>
---
drivers/char/hpet.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 448ce5e..c8f4329 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,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] hpet: remove useless check if fixmem32 is NULL
2013-09-04 12:35 [char-misc-next] hpet: remove useless check if fixmem32 is NULL Tomas Winkler
@ 2013-09-29 20:28 ` Clemens Ladisch
0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2013-09-29 20:28 UTC (permalink / raw)
To: Andrew Morton; +Cc: Tomas Winkler, Randy Dunlap, linux-kernel
From: Tomas Winkler <tomas.winkler@intel.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@infradead.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.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,
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-29 20:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-04 12:35 [char-misc-next] hpet: remove useless check if fixmem32 is NULL Tomas Winkler
2013-09-29 20:28 ` [PATCH] " Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.