On Tuesday, November 05, 2013 09:25:32 PM Mathias Krause wrote: > 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@xxxxxxxxxxxxxx> > Cc: Len Brown <lenb@xxxxxxxxxx> > Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx> > Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Applied, thanks! > --- > drivers/acpi/event.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c > index 8247fcd..fdef416 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); > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html