Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751259AbbLZIwV (ORCPT ); Sat, 26 Dec 2015 03:52:21 -0500 Received: from mout.web.de ([212.227.15.4]:56093 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750815AbbLZIwR (ORCPT ); Sat, 26 Dec 2015 03:52:17 -0500 Subject: Re: i2c-core: One function call less in acpi_i2c_space_handler() after error detection To: Wolfram Sang References: <201512261449.pmBxYtq3%fengguang.wu@intel.com> <567E3CF3.10606@users.sourceforge.net> <20151226074859.GA905@tetsubishi> Cc: linux-i2c@vger.kernel.org, LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <567E553B.5080005@users.sourceforge.net> Date: Sat, 26 Dec 2015 09:52:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151226074859.GA905@tetsubishi> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:qibdL/x2/iLQtnT1DjlJx9qv3pLmAaM6H+kUE7yJ0z1ABa6WSCZ uiddtdtT+Tn0Jv5KR2RdPPlIq8egcUxdOEYoIccslfGYjCgs2z/zJerkg2SNzioEW0caXZ/ gL+barVYIKtTd7kDMrvEDSk1i4n8doUXAtQ96c5utkqUduU4a7rUw99Ix752bCNubo+/rHS xjmWSaMmx4oChLWqCV0pA== X-UI-Out-Filterresults: notjunk:1;V01:K0:/H8Py0lmJtw=:n+kHLluN5kqiBg38C2rQFK l2Mxlhw1HoMaFpoWtp3Wa5KlTm5FaXE/FY9H3WBqgafovNPxbsiusu+tig/2dkB9tVT+ykq68 uIzN07ZbipID7Z3X1Sv+6nZdWfdZNYxrMBTdmIqCcmohQjlVpzsYOIXdLc/qPPLiVsiMtRU7j 7a/LOsH3PVyFw4EQw3eCmAB3x5yXKQArB7N3mVl3O3P4DkmO2cN5aCaHK9FDjNLlDm0YxYo5l V/h0VFXS4nURAkffp+jedcfV9qLZgCLYjJ1kPH9nllMcRfyUuI5IBZEmAWNynZ5JdZIuYMly6 D6K82/i7X1y2Blx4o4p4GVXTdDtZIBXPRfVa4j1sOy9ZhC0yNxRtKpXWGjYuzWnkAbWFvrSW2 DdiiJYNcOxzCi4zsQ6hzmrNSm4Z+uMDy5ou8DXnJhMLNnVD/pYDno5z1DQunwno89y6ZAtxDj I8Q41kuJ09WCBMCmQ5ESyeiR7QXq+NYvXoQyOn0Td4uadDwUx+aXJf0Gh0EqkewMc7baQ/29N PZmDlWqJF64jcPqSBtIn1YiKA73alkYj/5+/df+HVXAfDcC7q237B8E/OL+ynhBDV9PLDrXH/ F0dc7QvYAtb0oo7BXYp8nAEGur5H1wyc6jJObCFCMZwIdmyCdE5ozp3ZCKA30yrS4roo1d4Cw aBcsFuQliENYosnvprJRVtRwtfJEUDP0qyixj9ieFlD+zUW0VTr0DkVnTHWwK/lw7lP4uIXwc rCmenjgxrAJt68pNwn4hnoNKptjr0w+stycAX/XM5kd8hBynEfoPCYd4sBFQhe37Cvs71K0GQ e6r/na4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 709 Lines: 17 >> The kfree() function was called in one case by the >> acpi_i2c_space_handler() function during error handling >> even if the passed variable "client" contained a null pointer. > > This is OK. kfree() is known to be NULL-tolerant and we rely on it in > various places to keep the code simpler. I would appreciate if an unnecessary function call can be avoided here so that the affected exception handling can become also a bit more efficient. Regards, Markus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/