Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1673988pxb; Wed, 9 Feb 2022 01:51:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGDSYoGTBCz6BUhMUqum/+y9HQ68EA5igY3aLfEPP6+KoQDffiN2T6I16JuP6AxZgE1eLc X-Received: by 2002:aa7:8082:: with SMTP id v2mr1510238pff.17.1644400302245; Wed, 09 Feb 2022 01:51:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1644400302; cv=pass; d=google.com; s=arc-20160816; b=Kz5YSzN/CkET/XdeepvPeDhWad1fxzF2r8HUtozMsj/0NBbBnzRX5cMQnLNJu0nJ0B RS1IKHfY80swIu+igkNDIs8JWN90RlEJml1XZQqNJPxLqD36crPc1OQaQXuhtm8dGds4 tnf2z+ny+QaqGXmrwBALWRE5rUru/5Qj7GzABG0BicE47h/ohotN7fbyrwFl28H7Pdo4 ISBJUtNs/0towAWoFJYWyXxjZusODendt8H7FoOdmtcgy/xH2Od8pXn7Hd/GRlt5gIwA 7Xsscra931qjwTqeJnaLJOyq+z1vVNIfXfaFmdwtaz1XdZpOSrxGJZqn/MiHMoLB3QgO C9Fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=DmRHfzkMi84hiJPh0k6g3iUR8t9qjpiNNvP/vOenh7Y=; b=HGlHkL9C8978vFamQZ3earVRzB3cZ7bx1zc0ymz0IfUcoCrhXKd9viCPR1KatSW4H1 k/R0qtNH77yiM7dGuvrKt9W1qCr+zAd6qNOzNo1MwFRotq+G9uks4bgtTpo89zw82psc IyzTgaqjCLQnbYwDnoiZJZqvCIarORwbtsusb7+k676lelOyIIoamd3SNkt++Jdzv7TU XMhdjkkYwV3o0coOPbOeNuOatZFIFAbJWXEWy/QaDZXeDLLwX8/vRd+XgVSeikUt4OT/ 2e6+ZB8Jy7a5ADZ4ZZiIBN41SbL9ZORjsqNpS40H8+8VMA4XjEYQ4B59tpnvXcKXFIyC 40tQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=1RuPnupb; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 15si3044677pge.436.2022.02.09.01.51.29; Wed, 09 Feb 2022 01:51:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=1RuPnupb; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346823AbiBHEY1 (ORCPT + 99 others); Mon, 7 Feb 2022 23:24:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245701AbiBHEYZ (ORCPT ); Mon, 7 Feb 2022 23:24:25 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2054.outbound.protection.outlook.com [40.107.92.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF63AC0401E5; Mon, 7 Feb 2022 20:24:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jwpeJAxYOeoVsLh3kJux2ZV1q5fvaUulxGkPDImWKKGDDXwQbFI1gm61MMM811TZe/3uf5DswSwtRD0w6cm9Y4xmIJfxpvli8Idj5pjowh66dNy2mwutVUuIvU5Kp3NChwJRfYfo/e7w7yMscaL1kstr9xlWA9Aj5C6PAqH3lZsDKCdQIp8T8HSWYDIlCFAOjVy2VfKcY4/+nJqa8LnxoKgRL5S5FDw4F0Aj00r4vZ/ZxoD8sCNS1g1lN4Hbe9LeDchxVtP4r/6YoXb6UsW90En+1u3OODrzJgoN/VnQjvaWHqmhNQS419GpIzons1IfTOhcWztmmfn+5nH8cxCCRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=DmRHfzkMi84hiJPh0k6g3iUR8t9qjpiNNvP/vOenh7Y=; b=Z56g3S3RTif/6evZ6j4d9+7R6cb9Opf81R6toPspG8VHskd8qJmJhTiMJiJ0JGKOFHWWC6EWZ2Fr5/VTWKA8Cc9rYQQMtMnkyViqNB6hH0DWGUa+Qf+4MZgqjFkD2bBUvJhOuIGjwIGE2Z/TDpJE95+7bLTaTCu8A30FKDup3UM4IuLoqCCTfzDyT+YpSwagXAYQHRDFZlFYY1wo+RxfkfIpY4TDw5WBKpdo0AmLj1P8xPNaK3xOjDWAhcVXodLLZayIzYKsoQYsbGfad9zuJTOEl3YiwJhyapQU486G9fYVYWyvzCa2MqBcEknuPxEbHeLRn+QBFWkIRjRr5HSHUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DmRHfzkMi84hiJPh0k6g3iUR8t9qjpiNNvP/vOenh7Y=; b=1RuPnupbp8HjZhNehUvQbWwyF8xQSUA6zGh0f3JW0WaYSigLyUEHZtiT3CqQUjtPqHGuFoXxu2EfN9P1UGQCnExv028URGYDYDsm1dBdT2G9in02rlyLxEk1lZyaaQOfsdn3bA4M7coIr4T72bJ1sJ/WkTgGRdO+Y4PAwPwikJc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1242.namprd12.prod.outlook.com (2603:10b6:3:6d::18) by CY4PR12MB1288.namprd12.prod.outlook.com (2603:10b6:903:3d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18; Tue, 8 Feb 2022 04:24:20 +0000 Received: from DM5PR12MB1242.namprd12.prod.outlook.com ([fe80::e848:f5e6:6c9e:47c6]) by DM5PR12MB1242.namprd12.prod.outlook.com ([fe80::e848:f5e6:6c9e:47c6%7]) with mapi id 15.20.4951.019; Tue, 8 Feb 2022 04:24:20 +0000 Subject: Re: [PATCH v2] dmaengine: ptdma: Fix the error handling path in pt_core_init() To: Dan Carpenter , Christophe JAILLET Cc: Sanjay R Mehta , Vinod Koul , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, dmaengine@vger.kernel.org References: <41a963a35173f89c874f5c44df5530dc09fea8da.1644044244.git.christophe.jaillet@wanadoo.fr> <20220207165117.GH1951@kadam> From: Sanjay R Mehta Message-ID: Date: Tue, 8 Feb 2022 09:54:06 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <20220207165117.GH1951@kadam> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MA1PR01CA0099.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::15) To DM5PR12MB1242.namprd12.prod.outlook.com (2603:10b6:3:6d::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7c9e6ece-8532-4618-3fcc-08d9eabae077 X-MS-TrafficTypeDiagnostic: CY4PR12MB1288:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7RdqK+oZ1SwYZ668NSP3aO81a/M4a8wpj1Qfm8GVwl8U4DW6FeGXgdZ9yuxebi6H7dCFY0UDPv+9kk83hXAIXOvNYEXPuH0H0Ao48ShBEutqiL+vT+L7g0iAKbNmXAWEk1RUJNtuM4tP6ZZJPpSFJ9vbvWa0nNBST6TnkcxWT1TCmj2BPQHU6ia9MgAXc2qflZBOoM4fuMhGSDLC03CyJqmRn91peFH90Ypty7cFBYH7K5DJGm6Cd56PHGFIiSCYaP5Nut+dgpJzFSxLVk3RRYUFVwDRB6o89IXUhiekVIKpeWsN41RSs8Jh8NU5P0dJNsv9Td+NsiFUdUJL9DIARAZbYiKYtipLwA3HIAu33vq6Uc64cw9e381/5kouoz4+u9xaXgUuY8S46a6vlKZqonEavJRaGeb+fsOoissmKf3XDr6cIbXqNkXNGXYfgo2VSyvUcqZM5zPRaRWUNTTn8hhFwnwjYUdG1EnXq9q++PJJV0HLCU/nfeaHc2QbJhTEJVr5xzrQBhlaAlUFGD5RvSBNYiYYKS1JHNWI/rW9/bmfAmsVVzeT4pWVLnSi4JLAM3liZ7xrW5N7qgs3RvgSDiFyeO/WoSvWEDy8k25n8du/6wDpbX2UjpgjAV2KW/MfVraFm21ENSPVzJnKusQjKgdwj5uRHqQ8MHddpJbKAJb2cpNjFz9h3qu3WP1ScG/Hc1fh9MeiR7uYA+6oCy9nLEk7QKslhLZN0b3ypk4+YRQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR12MB1242.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(31686004)(2616005)(4744005)(5660300002)(186003)(26005)(4326008)(8936002)(8676002)(66556008)(66946007)(66476007)(6506007)(6512007)(6666004)(2906002)(31696002)(508600001)(316002)(36756003)(54906003)(6486002)(83380400001)(53546011)(38100700002)(110136005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UjU3dEZiOG9jazlZUGVXRUx3R1JLWGtOcklxbjZiQmtHeitJMlh6dmZ3Ly9P?= =?utf-8?B?dHNxdjhWL2gyYVNNS2JPbnlYYnNkbFZzMk9Yc2RxNmhnbnIwaEVEcHdvYnRC?= =?utf-8?B?TThiVUhFZTNzL20vYTBjaGtMTHpqWDJKb0wvL2RWa3liV1ZmSk9PUGtwZFFQ?= =?utf-8?B?RktFYXZuNkRkdVZNN2x1a2E5bXZFR0twSm1WanM1aXB0TXI1anZDQ2Z5NUhj?= =?utf-8?B?TkJ1R2Rmclp2QVQ0eHJhZTFNUEk5eXQ5SGI1Rmh5eUc5SmZXTG5xR0pnUkJS?= =?utf-8?B?VC9ISUhDMkxmRnhyanZ0cUQxdHlEcHV2dFRadWVnZ0tYK3oxWHRZNWxYOHQy?= =?utf-8?B?TkJOcGFvem5ld0J4NE9ETkI3RDVwcTJWcm4wYXkzemtiOGFwUmpoUk13SGwx?= =?utf-8?B?TEZsMHFOeXdjOHhlcVladG1ha05DWk1tbzVMTW8vNGtieFE5bkpWSzRtNTVp?= =?utf-8?B?b2RqTjFRN0Z6Ni9CMVdxSFN2Z3NTeEhCYmZyZzFIQkxzZUpibXBtWkZtL2RQ?= =?utf-8?B?T2lzWVc3VGVlMk1JL05LanhGRjNrRVRnYzYzLzl6VFl5NVlpRHFCZ0szNkJB?= =?utf-8?B?Z0FyMTNkaGdkYy80WlFOc3JnZEZrUGp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hzTUY2dnA4R0ZlZHpidkdUSkYyZ2dRVjJkNDYz?= =?utf-8?B?TGRRK0NiTCsxdzdySEtvdHRmYXZ2L3dGUkZyNEtKUGY5Q29JNnAwOEJTRDJw?= =?utf-8?B?V2tLM1dpYWhvYnE5aU03emlxTDhkVkFTWVRLUjEyUldxOXB6MHlLeTA5WFpF?= =?utf-8?B?WDdWSVNoMXFRSFdvanc0Q0Jmbjd1dnI3WStFOW5US0xLQXViUVArL0h2UjVX?= =?utf-8?B?ZEhsVElNVGxLQ0JLVUIvRnVIR0hTeHlCSS8yMDJ3QmcyVWQwQklkT3lWTGd3?= =?utf-8?B?WEhSTTljejhDMTI0NWRyYTlmUFlCNkdHTlU5RitRMG5CTUpZazJobTYrUkNh?= =?utf-8?B?Q3VPKzRCdlRhWEdvQnNUaS9obXRVUG5XaGhqVHVPTHZndHFWb1FXRHF1ZENI?= =?utf-8?B?Y0F0aCtEQTd3cHgxcFltT2l0cGNFa3NTTjJ2VGFXZS8rL0J3SVVaMVZEOEc1?= =?utf-8?B?NVlLMVlCWGszNTNqb2xZSm5QVUdNMzU5NFl6Z1lzY2FEWU9xeGZYbk8wSlAw?= =?utf-8?B?OGttWWVnU3BERXF3Rzh1NUtkeVJwbENYRmhuODFUMkh4QlhwUHBGdFRrY3dB?= =?utf-8?B?VEZlNmFmMjcyeDlId0xDdWRBQXh6aCswNnV6OXduNVdtZ0JrMkpoVHc4YkNQ?= =?utf-8?Q?CPS3a5KIrlIwa6bGNUOKw5M=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c9e6ece-8532-4618-3fcc-08d9eabae077 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1242.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2022 04:24:20.2863 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fPkflLsLumScy5cL10LBXd47ghwKp+cwN2G+HtoNHP+5zxCUTgnU3MIdSltk4wNeI0ZdSFiunF0FCKiPH2gdTg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1288 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/7/2022 10:21 PM, Dan Carpenter wrote: > On Sat, Feb 05, 2022 at 07:58:44AM +0100, Christophe JAILLET wrote: >> In order to free resources correctly in the error handling path of >> pt_core_init(), 2 goto's have to be switched. Otherwise, some resources >> will leak and we will try to release things that have not been allocated >> yet. >> >> Also move a dev_err() to a place where it is more meaningful. >> >> Fixes: fa5d823b16a9 ("dmaengine: ptdma: Initial driver for the AMD PTDMA") >> Signed-off-by: Christophe JAILLET >> --- >> v2: update label names >> move dev_err(dev, "unable to allocate an IRQ\n"); > > Awesome. Thanks! > > Reviewed-by: Dan Carpenter Thank you! Acked-by: Sanjay R Mehta > > regards, > dan carpenter >