From patchwork Sat Jul 25 16:24:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 37344 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6PGSQa3023514 for ; Sat, 25 Jul 2009 16:28:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752105AbZGYQ1s (ORCPT ); Sat, 25 Jul 2009 12:27:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752003AbZGYQ1s (ORCPT ); Sat, 25 Jul 2009 12:27:48 -0400 Received: from mail-bw0-f228.google.com ([209.85.218.228]:45988 "EHLO mail-bw0-f228.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751439AbZGYQ1r convert rfc822-to-8bit (ORCPT ); Sat, 25 Jul 2009 12:27:47 -0400 Received: by bwz28 with SMTP id 28so1904454bwz.37 for ; Sat, 25 Jul 2009 09:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:mime-version:content-type:content-transfer-encoding :content-disposition:message-id; bh=T/8qrZh/0HWGkUxeXWeRU5FyyCgb+dANs2cxC7SQNMo=; b=e28mbQIrUqbGM9Lqw/OSf47Edakhge8bNyI8nvnMZ6K/kZpvfzuttjq5U0SviotqWS LI6Kb3Sc89eqmK9z9n0gf6uX87LDhfvg9rWbeMCQ0MPqmcsniHxRqmbCo/saHxp/bIHU OEMvTB4bpyEWvd5SUr2IUqSnb3CxsKMT+764s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; b=K44gNVCyJImRxj/8JSlig7rVixvjpAffn8gCxcgG4tt+UJ4ScY9QO8jpSLpvTX6UvM oBQn99jPF2NVaahuMMJWqCRtTnpE7EEhCXUGrfMSd2BZmjiqjj5/Ke3oqQmm0g0z/ptT bjfGQdde20UsmPMwAOMTodaarvbpvtF50URUY= Received: by 10.103.121.16 with SMTP id y16mr2372116mum.6.1248539265381; Sat, 25 Jul 2009 09:27:45 -0700 (PDT) Received: from localhost.localdomain (chello089077034197.chello.pl [89.77.34.197]) by mx.google.com with ESMTPS id n10sm18778491mue.47.2009.07.25.09.27.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 25 Jul 2009 09:27:45 -0700 (PDT) From: Bartlomiej Zolnierkiewicz To: Len Brown Subject: [PATCH] acpi: remove superfluous NULL pointer check from acpi_processor_get_throttling_info() Date: Sat, 25 Jul 2009 18:24:30 +0200 User-Agent: KMail/1.11.4 (Linux/2.6.31-rc4-next-20090723-04314-g011b7b2-dirty; KDE/4.2.4; i686; ; ) Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Dan Carpenter , corbet@lwn.net, eteo@redhat.com MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200907251824.31074.bzolnier@gmail.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bartlomiej Zolnierkiewicz Subject: [PATCH] acpi: remove superfluous NULL pointer check from acpi_processor_get_throttling_info() From Dan's list: drivers/acpi/processor_throttling.c +1139 acpi_processor_get_throttling_info(11) warning: variable derefenced before check 'pr' acpi_processor_get_throttling_info() is never called with pr == NULL. Reported-by: Dan Carpenter Cc: corbet@lwn.net Cc: eteo@redhat.com Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/acpi/processor_throttling.c | 3 --- 1 file changed, 3 deletions(-) -- 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 Index: b/drivers/acpi/processor_throttling.c =================================================================== --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c @@ -1135,9 +1135,6 @@ int acpi_processor_get_throttling_info(s pr->throttling.duty_offset, pr->throttling.duty_width)); - if (!pr) - return -EINVAL; - /* * Evaluate _PTC, _TSS and _TPC * They must all be present or none of them can be used.