From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A34CD45CA1; Wed, 13 Nov 2024 06:01:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E206400D7; Wed, 13 Nov 2024 06:01:29 +0100 (CET) Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2055.outbound.protection.outlook.com [40.107.247.55]) by mails.dpdk.org (Postfix) with ESMTP id A4C9E400D6 for ; Wed, 13 Nov 2024 06:01:27 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ke0hDmklHeU/WlRwW0dv5t/5f1ORyFlrQNmAnSS2Q24DRjJ+iQx88bJ/+BL5GBNDzjGxc3viDh1obhTBP5DYfCEznK1GSJHUFQyruRqWSEdzPhGr2lhWzAwojn5ibwfxVDRw/tjzcgUW4cLNlJfqeRZd8Ane7i2PI8IOZ80BpCVFKV8xugkGB64410fJ1P+QYY2ITOwmASXG7IcuBtgoQdiHWpEbn+RC/pmEklTn6/Nu0TbJnGRKAf4ixjzQHnqn5DURQI+yeOwjPSTjRI9za8U0wrwqR7JgfIAPr2yvyJralDuokC47yUU2V3i59rS9fsosiTKT+/iH2QI86HK7hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tbA2elsf7nMD1ytwMCKhhi7T8jK4mzmCmXlU/tLEGlc=; b=oY+5EEVjHzjSX2QijEBxZGrzhKBqdLkYzl199Qk2M7DYRv9ZTt29/j2hq22/PuI9flyAiqTTmJCEPO663HEYE+AvlNvDGM3T3GLJrElnUDHi7naRC7zd6c6FGBiDoL605/143iKtFh1wpk0KRpRKnRwRuw4HdaE8YKmJ6oWcDOkUIeIKXpk+/1plbmRJmsp6l9JnVWPjjNm+e6N3LwY4gDy2j7SeGoM8WubCx/uSL4ZDK1+TdT/El9MclCUamcZE94Erj3AuTbDVLOPL4x52RlvmMpaj/c2kL/ZrfKREgW6LECcoJdinvYSI3f1AYNcG1ZLKtt1QvhX6YkCkYQD2aA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tbA2elsf7nMD1ytwMCKhhi7T8jK4mzmCmXlU/tLEGlc=; b=LtCUy8vP7D2KWelITiCr3Cntku2px4rUpKwz+oB8k2dm566ecwDpql670ulDi04/H2KVPQcKbXDvF9w3KESpeI17XeGjb128gFpQVNYmIvP/axeMOULhtwYxRWx0GyCZtCvOUnW9zF0ba1w8rvya3lYxYHJAVQumCuko4mNtCk4VFhUzYINW4tnxTDjHJzky+i4FFOrYEDvLmjyi2T70xQ5y1aqW5mBWl05DthNB770EdIxmqBOqjOgKg83Ulgs06mmzSSiJfQlhBPWiSTV+6s1Mf5190IvsPequPeLY1LWK6rvwagYJE9NN+dkZ/0OzlIP79VH+lbvER8UaJ4gBkg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by DBBPR04MB7610.eurprd04.prod.outlook.com (2603:10a6:10:1f6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Wed, 13 Nov 2024 05:01:25 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%4]) with mapi id 15.20.8137.027; Wed, 13 Nov 2024 05:01:25 +0000 Message-ID: <658fb317-ef84-4abd-4442-d89ebd6d36f9@oss.nxp.com> Date: Wed, 13 Nov 2024 10:31:20 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH 1/3] bus/fslmc: remove unnecessary null check To: Stephen Hemminger , dev@dpdk.org Cc: jun.yang@nxp.com, Hemant Agrawal , Sachin Saxena References: <20241112173833.323934-1-stephen@networkplumber.org> <20241112173833.323934-2-stephen@networkplumber.org> Content-Language: en-US From: Hemant Agrawal In-Reply-To: <20241112173833.323934-2-stephen@networkplumber.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SG2PR02CA0026.apcprd02.prod.outlook.com (2603:1096:3:18::14) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|DBBPR04MB7610:EE_ X-MS-Office365-Filtering-Correlation-Id: a558907d-f563-461b-4a81-08dd03a03966 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?bVN3a2FMai9SbEkxY3RlZ0I0Z3MzNG5MdmVsQnNvcFNoU0U4Q2dKQVViSVR5?= =?utf-8?B?UTFxVTU2OWVxSDdZcmxTS1lDdE5iVWZiSVZmYXFwVUxJczZnQzJGc1JMVkZr?= =?utf-8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RGZUdxQ3BF?= =?utf-8?B?alRjamZ3UjdOdkhBNzdERHhWRmltSERRZ2xxTmlaZlQ2di9MZ3ZoR0owYTBC?= =?utf-8?B?WXpxMk1Wd1dwMDg4UWRDYUpCWHhDQzJLeDh6VUMyeHVaOHgwc29nSk5Lc2hD?= =?utf-8?B?amtyUmZjOURpR3ord3hBa0RnTnFWRFM5N2hVQjhBM3orZ0ZCbmRkRzlHWEJX?= =?utf-8?B?djltcklXY2FuMFFLWTdWRERLaHc0L2NXM1JXbnVHVVpaOEZsbWRTSmxZaFJo?= =?utf-8?B?SUI4VXdWdllrbUt5SUZjV21kd0swWG5IVXM3T2FzL0VzQVdCVFlmUVp6dHV5?= =?utf-8?B?RFZPQ0lGZ0RHWUhGcVYraHUyVTJjR2NZVXFSYnlOcmJYRGRvUW50UHp4bllR?= =?utf-8?B?NnAwYXlabUxucCt0ZHhkczdoZGhVZlNVMmxuREFhc0JHZi9KT2NCSFNyZ3g3?= =?utf-8?B?NDFSdkNiNXRZQmZoWFhVMHRpV2ltb2NZajFqWklPS2hJL2VMR01uazBhS3NW?= =?utf-8?B?bUZjWHFIME1TSFJ2ZEl6RkFxbFhpM3JENkQxMlRNdWNrYjlnYnc1T3J4ak05?= =?utf-8?B?TElGcXY0QjZpZGN2M2JQVFBXd2RsQU5oTzVoclJTeVF5Qk5SZzBncU1JZWhK?= =?utf-8?B?eThGMGtiT2ZhZ2g5Y0dZNFZ4QStha3dOcU10RU9BUXFPZDQwN1laazlKT2lv?= =?utf-8?B?ekkvUG5vS0t2dEtNWFRXQUNmR0hrM3dyRnpoc3FBWnRhKzJoTHlRYmJoM3VQ?= =?utf-8?Q?t0JlUv9dRiHVOaKggvJbEj1DJzP5Z0Eb5f7oku6?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799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JVbHAvZUVySGtWNDF4WmhDZUlONUxXcEdsckVMSFg1VFR3Zm9VY2hv?= =?utf-8?B?bmN3RExvMzcrdzAyWUcrZlVSak1jcGE0QmhiSDdBaUJQdkhhc3VWZHVvY0VN?= =?utf-8?B?NDc3VHJIdmZ5WVRLRExDWlYwSHo4VHo3Z29JQnkrZDhINkw4d1NDZjRPMkhL?= =?utf-8?B?NTF3ekwvelZaWHJ2a0o0S0pUdzdWVG91UGxlNkNnYmpJVDBYQkpnNFNZcEVM?= =?utf-8?B?ZFQ5alpPaXhVUzNJQnJhV3Z1cUpmZExjNDhiMzV1Ukx0dHcyVWphRjZYdHh0?= =?utf-8?B?eFhPN3JzeHF0MUNWakt1SXJqMTlTa05kWGR1OVZaZGJSWDBFTG53UHBwaXdR?= =?utf-8?B?RFRNZGkyTWdxVndBN0pmeEMwQUExbXZpQk9GZVhjRGJsVTlaa3FvZVhPdTN0?= =?utf-8?B?VHNsYVdTTkEzMkJWamJScUd0Zi9hWDhDT3N3NWx5eWJKY3JEYXZMc0R5WFlV?= =?utf-8?B?akE9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a558907d-f563-461b-4a81-08dd03a03966 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 05:01:25.3106 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5oQIP91UMv5nbQTRVf+0oOVA3P/wlwu6nj6H6Jo+kpLCn/Ce6F6eZsbToEGf0XFOSvocEVc6+I4KcUO84qEBiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7610 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Hemant Agrawal On 12-11-2024 23:08, Stephen Hemminger wrote: > No need for check for null before calling free(). > Caught by nullfree.cocci script. > > Fixes: 57cb02edf122 ("bus/fslmc: enhance MC VFIO multi-process support") > Cc: jun.yang@nxp.com > > Signed-off-by: Stephen Hemminger > --- > drivers/bus/fslmc/fslmc_vfio.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c > index c581dcc4e2..7a584b9280 100644 > --- a/drivers/bus/fslmc/fslmc_vfio.c > +++ b/drivers/bus/fslmc/fslmc_vfio.c > @@ -557,8 +557,7 @@ fslmc_vfio_open_container_fd(void) > return vfio_container_fd; > > err_exit: > - if (mp_reply.msgs) > - free(mp_reply.msgs); > + free(mp_reply.msgs); > DPAA2_BUS_ERR("Open container fd err(%d)", ret); > return ret; > }