From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752646AbdK0OWN (ORCPT ); Mon, 27 Nov 2017 09:22:13 -0500 Received: from mail-pg0-f54.google.com ([74.125.83.54]:33213 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752134AbdK0OWM (ORCPT ); Mon, 27 Nov 2017 09:22:12 -0500 X-Google-Smtp-Source: AGs4zMaw3X7KYya3Q1IDcdJki9nJisN7zVSUpkok3tt9hCAvs+LnrpspbyqgiiR/8FnoiaACjemNaQ== Reply-To: minyard@acm.org Subject: Re: linux-4.15-rc1/drivers/char/ipmi/ipmi_si_intf.c:2282: bad if condition ? To: David Binderman , "openipmi-developer@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" References: From: Corey Minyard Message-ID: Date: Mon, 27 Nov 2017 08:22:07 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/27/2017 06:32 AM, David Binderman wrote: > Hello there, > > linux-4.15-rc1/drivers/char/ipmi/ipmi_si_intf.c:2282]: (style) Expression is always false because 'else if' condition matches previous condition at line 2279 > > Source code is > > if (new_smi->pdev) { > platform_device_unregister(new_smi->pdev); > new_smi->pdev = NULL; > } else if (new_smi->pdev) { > > Suggest code rework. Yeah, definitely wrong, fix is queues for next release.  Thanks. -corey > > Regards > > David Binderman