Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3320587ybc; Thu, 21 Nov 2019 06:42:18 -0800 (PST) X-Google-Smtp-Source: APXvYqx4NFJUmRi1/ZMqkhfFdbCpshmXKh2vrbIiqi9VHFKt8UfFEfpQoHIsvtFwRqSGHaoZEbK7 X-Received: by 2002:a17:906:938d:: with SMTP id l13mr14583724ejx.74.1574347338282; Thu, 21 Nov 2019 06:42:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574347338; cv=none; d=google.com; s=arc-20160816; b=K0JV59Xcfn8rdcRo+103EUo1cyM5+0f/QzzorEGdgP9BafipLLDJmOFUdbq365PBjP lOQa10ULEy+pC1I041dWgYgMfGox5RXcYXGBNlnWAN4TipF6j7nP6bJIflhmifW1z3jd J5a2PyOFcrLKjhmrcAncBd+uRNuxKX8YoTUgfqkSmkd4ogrcrviztfSj9/7tdC04WZIQ CMRrBuHoJdnqW3N+8mK+0ReOM4dO/Y3opCLnJnkTFxYsoLLEtPkRpQyKd+gdRZAUgsGA +S07MDfBxgUpTUrX5lcXPXAbk0L+tYWpkVN6qhZHQXJ1r0eKw90ViHwCKcLkYK+LnIuy enOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=v3HAeKTDuYmzuUaQeHubT3yslGYo+k+ZzrAxM1aVtS8=; b=eq++2SYcl8ycgV3nBOQEeDs+jUIR8VPfgGC+DudFMiUB7+At2zZE0x5ba2JJ60xzc+ uXpIS2o3pT9EBNc3dVyDhosG6WL18wWn9uOJDUPRJ61RKzWxusKDR9nUFMVghLVvvZbn mHdwWBLveS7dl/s8UuoL1rKUnHxtbl4PatydATum+0PtIqEqnwa/Kfyxs9JCJtPSJGHb wuNqz/JQWqZUgYiSEfM7lMb2n6mFJkgdmuxmzElHiYhfXiacZb+aTVfkW97npRfsr/lJ 5pPcg08bfWS3pH4fZbC0IcGw0iS5Jcyko9as1UT+2YRy1HZqzdlbRT29w96CYZGyImT3 Jx5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i+n8iBTp; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lw2si625918ejb.440.2019.11.21.06.41.47; Thu, 21 Nov 2019 06:42:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i+n8iBTp; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726500AbfKUOlo (ORCPT + 99 others); Thu, 21 Nov 2019 09:41:44 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:37530 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726396AbfKUOlo (ORCPT ); Thu, 21 Nov 2019 09:41:44 -0500 Received: by mail-pg1-f193.google.com with SMTP id b10so1704096pgd.4 for ; Thu, 21 Nov 2019 06:41:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=v3HAeKTDuYmzuUaQeHubT3yslGYo+k+ZzrAxM1aVtS8=; b=i+n8iBTpBDyR7d1J6RtX8F5T4vMMF7N4HmEspmZj3advGjog/V50F9QptSF0+XQKqx 08qEAs1AEWkO2pQrNWz1q5FvDK1tBXeU75RwsQkuAKSFLnLVr1M8P7T1Lwn4nMvgWNBc dPzZ2QdqMShypk+VuXSamMvK10C/3Gq9nnsWtmJQ/9OuXEdaJMYVMhaAAGgjtanIAT3y iMlmC/geLgks3LIExOHzkiOP9ficC5yvuN6TVDj7Jk9gxQXW+tR63bqhNrel8+k1BG65 HzIU4TX+iP4t8cPyRdW+LnZWlCPSBqcmy1MWsdw4NxkhfMHeYKsGUk5rOfLxpI2SCEXi RRdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=v3HAeKTDuYmzuUaQeHubT3yslGYo+k+ZzrAxM1aVtS8=; b=F3Dn/nrTo7JHJD3Ym2s0WcPAC47zmimDMcqCJdwfsgwZTxOulIiPLlprONPBHRqLul aEwSTIfxLQzwICSquEsnDpbSMHl/9KsFIL+8K7XWy389CfpWcA2xFoBquaN8qmmVWi9P 7/tIGCbuxjL3mt0dw0Fj2ZPe7KeTYoS13IM5iUrKODh07/CX+xyhsgwZVK2NhPnKAgf0 ZaBmJ26xGN5xp+cV3TIccXRG08SM2GVw5Ae72cSKHiTVGsWNc3Vx9tlwvDTzctmoCAZV gQO52lneu7UUvnY+CBcE/tsglPVkYI47dtdjVgQD9rfcIeqhefsjYoirWTQgOqiaJ7hK EZwA== X-Gm-Message-State: APjAAAUw7+pJa6Q8/1chm6xRqrwUFSsw3JNOiOmTFI3EIgDya2WSLKPn d+ERjaroR+H+HZPga5LDmgZ3EjmZE8s= X-Received: by 2002:a62:e316:: with SMTP id g22mr11262246pfh.19.1574347303782; Thu, 21 Nov 2019 06:41:43 -0800 (PST) Received: from localhost (jfdmzpr04-ext.jf.intel.com. [134.134.137.73]) by smtp.gmail.com with ESMTPSA id f19sm4117170pfk.109.2019.11.21.06.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2019 06:41:42 -0800 (PST) Date: Thu, 21 Nov 2019 16:41:38 +0200 From: Johan Hedberg To: Marcel Holtmann Cc: linux-bluetooth@vger.kernel.org Subject: Re: [PATCH 1/2] Bluetooth: Move error check into the right if-clause Message-ID: <20191121144138.GA70662@vaespino-mobl1.amr.corp.intel.com> Mail-Followup-To: Marcel Holtmann , linux-bluetooth@vger.kernel.org References: <20191121075130.92705-1-marcel@holtmann.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191121075130.92705-1-marcel@holtmann.org> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel, On Thu, Nov 21, 2019, Marcel Holtmann wrote: > The if-clause for hdev->setup should also include the error handling > since that is where the error really comes from. The code currently > works correctly since ret=0 is assigned early on, but it is a lot > harder to read and understand. > > Signed-off-by: Marcel Holtmann > --- > net/bluetooth/hci_core.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) Both patches in this set have been applied to bluetooth-next. Thanks. Johan