From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752711AbcAAXOw (ORCPT ); Fri, 1 Jan 2016 18:14:52 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:34118 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752525AbcAAXOs (ORCPT ); Fri, 1 Jan 2016 18:14:48 -0500 Subject: Re: [PATCH] net-libertas: Better exception handling in if_spi_host_to_card_worker() To: SF Markus Elfring , libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo References: <566ABCD9.1060404@users.sourceforge.net> <5686F0B2.5000000@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: Sergei Shtylyov Message-ID: <56870866.7020000@cogentembedded.com> Date: Sat, 2 Jan 2016 02:14:46 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <5686F0B2.5000000@users.sourceforge.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello On 1/2/2016 12:33 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 1 Jan 2016 22:27:20 +0100 > > This issue was detected by using the Coccinelle software. > > Move the jump label directly before the desired log statement > so that the variable "err" will not be checked once more > after it was determined that a function call failed. > Use the identifier "report_failure" instead of the label "err". Why? The code was smart enough and you're making it uglier that it needs to be. > Signed-off-by: Markus Elfring MBR, Sergei