From patchwork Fri Oct 18 09:01:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 3065281 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 80C76BF924 for ; Fri, 18 Oct 2013 09:04:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5603820456 for ; Fri, 18 Oct 2013 09:04:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C61920425 for ; Fri, 18 Oct 2013 09:04:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752348Ab3JRJEs (ORCPT ); Fri, 18 Oct 2013 05:04:48 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:16841 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522Ab3JRJEr (ORCPT ); Fri, 18 Oct 2013 05:04:47 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9I94eOJ001330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 Oct 2013 09:04:41 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9I94dWB029576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Oct 2013 09:04:40 GMT Received: from abhmt117.oracle.com (abhmt117.oracle.com [141.146.116.69]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9I94dsX029550; Fri, 18 Oct 2013 09:04:39 GMT Received: from longonot.mountain (/197.177.51.231) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 18 Oct 2013 02:04:38 -0700 Date: Fri, 18 Oct 2013 12:01:43 +0300 From: Dan Carpenter To: Len Brown Cc: "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] ACPI / osl: remove an unneeded NULL check Message-ID: <20131018090143.GB14256@longonot.mountain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP "str" is never NULL here so I have removed the check. There are static checkers which complain about superfluous NULL checks because it may indicate confusion or a bug. Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 50d40e5..a0c09ad 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1355,7 +1355,7 @@ static int __init acpi_os_name_setup(char *str) if (!str || !*str) return 0; - for (; count-- && str && *str; str++) { + for (; count-- && *str; str++) { if (isalnum(*str) || *str == ' ' || *str == ':') *p++ = *str; else if (*str == '\'' || *str == '"')