summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2013-11-06 00:25:32 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-07 17:10:41 +0400
commit9968e459f1378a1c00301472cfe672497fe001d5 (patch)
treeeaf1f2cc63029b4f2abfb2a940f62726558926dc
parente7e92ec93f218085e37ded8338f717ffd49eed1d (diff)
downloadlinux-9968e459f1378a1c00301472cfe672497fe001d5.tar.xz
ACPI / event: remove unneeded NULL pointer check
nla_data() cannot return NULL as it simply adds NLA_HDRLEN to the passed pointer. The NULL pointer check is therefore superfluous. Remove it. Found by smatch: drivers/acpi/event.c:130 acpi_bus_generate_netlink_event() warn: can 'event' even be NULL? Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/event.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
index 8247fcdde079..fdef416c0ff6 100644
--- a/drivers/acpi/event.c
+++ b/drivers/acpi/event.c
@@ -127,11 +127,6 @@ int acpi_bus_generate_netlink_event(const char *device_class,
}
event = nla_data(attr);
- if (!event) {
- nlmsg_free(skb);
- return -EINVAL;
- }
-
memset(event, 0, sizeof(struct acpi_genl_event));
strcpy(event->device_class, device_class);