Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751391AbdCRJHK (ORCPT ); Sat, 18 Mar 2017 05:07:10 -0400 Received: from mail-lf0-f47.google.com ([209.85.215.47]:33435 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750957AbdCRJG5 (ORCPT ); Sat, 18 Mar 2017 05:06:57 -0400 Date: Sat, 18 Mar 2017 09:54:59 +0100 From: Johan Hovold To: Alexey Khoroshilov Cc: Greg Kroah-Hartman , Wolfram Sang , Dave Penkler , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: Re: [PATCH] usbtmc: don't return zero on failure path in usbtmc_probe() Message-ID: <20170318085459.GA11134@localhost> References: <1489793880-14284-1-git-send-email-khoroshilov@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1489793880-14284-1-git-send-email-khoroshilov@ispras.ru> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 638 Lines: 15 On Sat, Mar 18, 2017 at 02:38:00AM +0300, Alexey Khoroshilov wrote: > usbtmc_probe() returns zero in case of allocation failures. > > The patch fixes that. By the way it rearranges error lables just to improve > readability of quite complex dependencies in error handling code. This was in fact fixed earlier this week by commit 2e47c53503eb ("USB: usbtmc: fix probe error path") in Greg's usb-linus branch. The current error label is indeed confusingly named, but that can be addressed by a follow-on clean-up patch. Note that naming error labels after what they do (e.g. err_remove_capability) is generally preferred. Thanks, Johan