Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1350598ybb; Sat, 4 Apr 2020 02:01:56 -0700 (PDT) X-Google-Smtp-Source: APiQypILoJR/oWv65vuZaAIoKedvEx2hkSNt5Kj3Mkqclkx+xVKsUARR8Oi/YOIj9M+h0VLbL3NR X-Received: by 2002:a9d:1b31:: with SMTP id l46mr9101216otl.95.1585990916244; Sat, 04 Apr 2020 02:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585990916; cv=none; d=google.com; s=arc-20160816; b=0q0+EJPVZC/8Q5CDj66DwPexGm6Rhye128T+2axY4aVc+b+8kvwaaOwvGkUBapmk0C dvUPU4QM/iX4MV77GC2HF16J9Ui9o1NhDs7a+efxf9UP4uHFKTi+G8Rp/RLHpeekC27d +7utI2gqKaY3MvrtpPdbIT1oH5MFrvxJReXTH7cAv/lV0VW0k32w3Kohwq8Gx9Fv85Cx 8lc7NHbA5FafRTOWDaFOQ7vrg7nugslhSvT3Rm4Zb4+iEaKqsLSWJZhmjRjX0Ma6kWM6 jp6F/UHDXz2IQLMdu+uXs6qrjwNEUu9PSAXAKPyACSj4jrjRO0MCy+fRXGGNZQNHUsWR 8m5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:autocrypt :from:subject:cc:to:dkim-signature; bh=6AZNLBH442OJ8odjJvTTvY0h4k6dpRK0RBQlSly1moE=; b=cfe0ax6xAlaMIj8MPK7K8jFDAHRIzE2I3V3DT+KCRcSaxHHpPkcEbdiawyeZBqjNhC UU9yYIxnRKNz9GlzHvpmJnns5DebLHGE/Tb7H2fylh1bCJuwmmmyS3BxSarpJUOLjdFb T0UuwOw3PULZSVWQl0SllwSl0jQ72Q1SccKBEkuI4D5E1lXbOADThuFzZcTPw5K00Moo mIxxJR1Rh3w7rj+S66PpEAveboty5v9cOZSVHRWLR1B6YKhnPRCDTTmWletgb8Un//9y oYY7VG9cEzoh8C4p7rkscJfmrWjjT1yBUJ4P6n73Pe6uVWx6+dRRRwiAYg1n8zi8ENi+ 7E0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=dbaedf251592 header.b=CWwAiRbS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h27si5175739oos.21.2020.04.04.02.01.41; Sat, 04 Apr 2020 02:01:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@web.de header.s=dbaedf251592 header.b=CWwAiRbS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726028AbgDDJAs (ORCPT + 99 others); Sat, 4 Apr 2020 05:00:48 -0400 Received: from mout.web.de ([217.72.192.78]:47967 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbgDDJAr (ORCPT ); Sat, 4 Apr 2020 05:00:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1585990808; bh=6AZNLBH442OJ8odjJvTTvY0h4k6dpRK0RBQlSly1moE=; h=X-UI-Sender-Class:To:Cc:Subject:From:Date; b=CWwAiRbS5oMBV7raoZQUBcLgFaDdoagCNIO4MF5k4X5QWwMD82+bqY26t5Eindwzd 1zOFHMnSy5WlfdOsb9qUamIqpMX610aRV4vF/4tlAcOZFi2dhFkb13mR38gNI9m+QH 4VFQonBOAvhY0IkQQT9/T+FRuIR4+OPX+JW86F5E= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.1.3] ([93.132.181.229]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M89z3-1j7ojZ1egD-00vkAy; Sat, 04 Apr 2020 11:00:08 +0200 To: Alex Dewar , Hannes Reinecke , "James E. J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: aic7xxx: Remove unnecessary NULL checks before kfree From: Markus Elfring Autocrypt: addr=Markus.Elfring@web.de; prefer-encrypt=mutual; keydata= mQINBFg2+xABEADBJW2hoUoFXVFWTeKbqqif8VjszdMkriilx90WB5c0ddWQX14h6w5bT/A8 +v43YoGpDNyhgA0w9CEhuwfZrE91GocMtjLO67TAc2i2nxMc/FJRDI0OemO4VJ9RwID6ltwt mpVJgXGKkNJ1ey+QOXouzlErVvE2fRh+KXXN1Q7fSmTJlAW9XJYHS3BDHb0uRpymRSX3O+E2 lA87C7R8qAigPDZi6Z7UmwIA83ZMKXQ5stA0lhPyYgQcM7fh7V4ZYhnR0I5/qkUoxKpqaYLp YHBczVP+Zx/zHOM0KQphOMbU7X3c1pmMruoe6ti9uZzqZSLsF+NKXFEPBS665tQr66HJvZvY GMDlntZFAZ6xQvCC1r3MGoxEC1tuEa24vPCC9RZ9wk2sY5Csbva0WwYv3WKRZZBv8eIhGMxs rcpeGShRFyZ/0BYO53wZAPV1pEhGLLxd8eLN/nEWjJE0ejakPC1H/mt5F+yQBJAzz9JzbToU 5jKLu0SugNI18MspJut8AiA1M44CIWrNHXvWsQ+nnBKHDHHYZu7MoXlOmB32ndsfPthR3GSv jN7YD4Ad724H8fhRijmC1+RpuSce7w2JLj5cYj4MlccmNb8YUxsE8brY2WkXQYS8Ivse39MX BE66MQN0r5DQ6oqgoJ4gHIVBUv/ZwgcmUNS5gQkNCFA0dWXznQARAQABtCZNYXJrdXMgRWxm cmluZyA8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djSGGN/5IBDfUqSANC8cWzHpWaHmSuU3JSAMB/N+yQjIad2ztTckZY pwT6oxng29LzZspTYUEzMz3wK2jQHw+U66qBFk8whA7B2uAU1QdGyPgahLYSOa4XAEGb6wbI FEE= Message-ID: Date: Sat, 4 Apr 2020 11:00:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:vZGcnRyqXOMIW9kJ5OPJxCBJCj/uHsX7pcmL2u8A0L1gUeRAbkg n+AQFwA1ngD/SO91jLCDlZ0Giau0UpFSYC1SMlFl/zZ0UoJnQm7PJrmvp6S/1Fj102xlDoh 2N+xmnECXcaKOYYxPDvHoHVlCbJ9jlcr6kLcBrQxPN7ooQOfws8nV/RuLBlnYNEzZs0ws09 XeIa72DGpsezllVtNIuJQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:51lskV8xcJM=:XlJVRhoVzCYSkiJDjTD8P0 i3VKTJoPM741eK0WVFNHqlLroLONDPehrlE50iJ65+vVJcnI4ZQr+5Lv/lErHx9xauawys5g/ uDrxHfFtub8oM8RNdRVZE+1uo3MJNCZQcXJNzozRx6jLSPpW2mQg21jKjHQpepTRIh/QFzEAz qb2BApTrwkSTqxU3mve6a8qbRJg75ug0pgAMVAsW52wou4PR2c2CrohynsauvVzAdIjfVc3D5 bAiA3kqTlFOdy1X+QjTZ6u53pqxRjKLZi+FMK9pZdmpclOpGa7p2iu/W6Uj844SoPps+ISxfU oLMvxBXRvPTs6E9LFTqiBNHSY/dbn7k0LdOvpf4hQdekdFz+BjDFRU9loa/ZcbGeVYBH97DBx CV1qxX508f8JOI7+3OdKxGNXW9kiWNbuM2bTGsMq1E6u18TyMl7HfVh6WpCD+MTUX6cEIGluu Ex0KK96hDFttoE1iNyD/dVIiVjN1yvviBth9/ek/QrdBzjPQLZZjmJVrtarJYaSMQ2AqgM1Ta dluMhzbFJUMcY1HO8gL1hQnptXHXPPE6Ec3CQyEIYv4bGj+iKzs7WNSEBYmYkoqcMZcsPSM7S Y1Mm05ccClfnG/Cv5UiTFdGxSzivyZy1XGuDtCcZ9DIi7NDTuy+pGJAW1jn7HqGYM3BZOB5Gs p/dn8071hhzBXrZ8qzEPhNyl3gfEFudcm9YAiZrmx81tn/UBPg+0E/9NSiiKoKW12r5Q9FVO3 0eC3MnpmvU9AEXnycs4Mx30UQyzm7YqytDAy0c0e3RSAxP2omb9NdxJPPU1IOGTptoCdO2FAe 04fSM7FDGhCkSg8aI4eR4+DmhOpVvoukZccvmATXHOZCg1c4PcvZ/irVS6yTJve6yhziGntrg OjXy+maB21atz1t+OoIRqb9qFQuolWpXt3fAU4OHBTYPCU73MIMeYYiQwhp6eWUz1Fc4VOJCe jtSRXAlmsvWuO1670ZtNHtOcLv5j2PWK0pLEQvVDUqOhuC9xkg7NNiy6ODfhj8pltqbpKoGq1 uFpDm1ef6fzS3iRy/WrDhy8Ierva0XWMTw6SP+PKPjckgTBJQl3qwKhUw1yYaPpXzjn9IiuFI 3UnD7ewioBxSAN/7+iJq6gnvCMDD67dPH5Vz4sckyt5ptYy4X7DNcD0OwwGglo4ETVu8rQWhY JJkLknpGxlSschFRbbK45xBOVY/+FkMzGDQo8uGLO4FzlT3uqQ+5bWRqj7KHvLoOYh51uXpVh sbeUakNxEruhMah8s Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > There are a number of places in the aic7xxx driver where a NULL check is > performed before a kfree(). However, kfree() already performs NULL check= s > so this is unnecessary. Remove the checks. I suggest to reconsider the distribution of recipients also for this patch according to the fields =E2=80=9CCc=E2=80=9D and =E2=80=9CTo=E2=80=9D. Do you find a previous update suggestion like =E2=80=9CSCSI-aic7...: Delet= e unnecessary checks before the function call "kfree"=E2=80=9D interesting? https://lore.kernel.org/linux-scsi/54D3E057.9030600@users.sourceforge.net/ https://lore.kernel.org/patchwork/patch/540593/ https://lkml.org/lkml/2015/2/5/650 Regards, Markus