Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2429984rdh; Wed, 27 Sep 2023 02:17:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEF4rLiVj03Amge/c5afqJJWKSUatPCib1YB+ecaUFx6aIDgfM4eyVFk+Ht+uUX+IOz5GX8 X-Received: by 2002:a05:6870:d110:b0:1d6:57ab:433e with SMTP id e16-20020a056870d11000b001d657ab433emr1813926oac.47.1695806251747; Wed, 27 Sep 2023 02:17:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695806251; cv=none; d=google.com; s=arc-20160816; b=DF8REKjp+sLiAwZVPslhQf+M0h2FEwLJDR0C5SFy4tKlyrRkKBQ2tiEbvc/3OOhC7+ jDJWiHK8FhHlLjBEWlufH7nMax/5FcbCQY0U71maNuyr+mkoBO39xnARAXBP5fNGoMP3 xaOAy8mFeXDl6H3u+YlKHmftyuyAXYTUq6piVd9LXKA7yErzmdPoVrEEvRzjZyzK3tJf E+8ywDOcvnWOL6UYd/Q3IQzFa5oGkuggI89tf39zU+ari4MA3n/7rA1Gh6Tj5GyZ+2W/ A00GFvSV33Owbr94rwq2aNMM6r/V7cTKxwkanafCm44MRdQXUNyZlonYqzbcT7oq3YcK 7MXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=hpPI7H71YLTp/qhJ48WY1OB2wvUnGRSuDDUbinRD8Ko=; fh=bFn6UYEJGoiP37EHyWIz36rywJ7WHOi9SGQqzpxJ/YE=; b=0jcaRIRe03V+IoDkdz03I3X3HHL6M92a0uoFAI2JPDzASyhD/nZMyqOWwAV8zLqURg WxSew23QjZBX9ZIh79tSylhhtYuR1Hs00f4GampvR/d4WzeWZdNw2QFn0gJEq1JzVUoo /dQKZ1jijtMqz9S8IBe6uyf5V4vVSUF0Rzj4W7/FlAh1WhtvWdeymqK+vqtq2a+zsurm HEhTeDModQVi3hjJ1WiWmKd8/mx3DI5Uo9sp3MQlbuCLSiau/4JvpsAQoA2Q88NGBuLq 5P+fKguHHa+MqCrA+JfcNkm/2HprCIhxssbZN9GVSswPAIFUEoE3PcOq4qI3pvQxu4qb jR7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m1-20020a656a01000000b0057749f3cbe1si16919444pgu.673.2023.09.27.02.17.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 02:17:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4D760829F9A6; Wed, 27 Sep 2023 01:34:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230379AbjI0Idy (ORCPT + 99 others); Wed, 27 Sep 2023 04:33:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230468AbjI0IdU (ORCPT ); Wed, 27 Sep 2023 04:33:20 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DF61D10D9; Wed, 27 Sep 2023 01:32:58 -0700 (PDT) Received: from chenguohua$jari.cn ( [182.148.12.64] ) by ajax-webmail-localhost.localdomain (Coremail) ; Wed, 27 Sep 2023 16:31:34 +0800 (GMT+08:00) X-Originating-IP: [182.148.12.64] Date: Wed, 27 Sep 2023 16:31:34 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: chenguohua@jari.cn To: lduncan@suse.com, cleech@redhat.com, michael.christie@oracle.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: iscsi: Clean up errors in libiscsi_tcp.c X-Priority: 3 X-Mailer: Coremail Webmail Server Version 2023.1-cmXT6 build 20230419(ff23bf83) Copyright (c) 2002-2023 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <7db9a4b1.889.18ad5c3d0ef.Coremail.chenguohua@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwDXaD5m6BNlifm9AA--.577W X-CM-SenderInfo: xfkh0w5xrk3tw6md2xgofq/1tbiAQAHEWUSpy8AOwAisx X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed,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