Message ID | 20211206014135.320720-1-bernard@vivo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <alsa-devel-bounces@alsa-project.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C13E9C433EF for <alsa-devel@archiver.kernel.org>; Mon, 6 Dec 2021 09:26:52 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 02E0A200F; Mon, 6 Dec 2021 10:26:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 02E0A200F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1638782811; bh=GbgNiOzYwrlWAcBvW+8KNt4T6Wgv5lfcuG4+B+SeoyM=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=V7ncMI+QWZw2MXNCTcPMUMoj6JvQ4KPLLOIDIYJ6ItTqzWNMzi7TsQMczDFUBDXmD ITzMEjFMwdWIaA3yLJpHbeRHG0v/4GvhSiAVj+xI0QzgcVQP5he4lYl9dtTg3ze3Tt 5u+nXIgybVi29/LS2nMX5eSeTA5F2qNLsWmzCYhE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4E612F804FD; Mon, 6 Dec 2021 10:24:08 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 57E11F80253; Mon, 6 Dec 2021 02:45:15 +0100 (CET) Received: from APC01-HK2-obe.outbound.protection.outlook.com (mail-eopbgr1300115.outbound.protection.outlook.com [40.107.130.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 78BA8F800D3 for <alsa-devel@alsa-project.org>; Mon, 6 Dec 2021 02:45:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 78BA8F800D3 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=vivo0.onmicrosoft.com header.i=@vivo0.onmicrosoft.com header.b="ApcD26QT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GOI78wMe3fuzA0jd6e04XLed1dlBnndiLJG+/6YBzY8fOz659rNskWzkNSWiHvbLiC1UUsngPGxa/szTlogXd6Y/b4PFPIBGEjhoWJ7Icn675OEot3XlQE/gXRIEkwUCu+dOmcg/e/Us27Gube7HSgawwxDbe/7yh9tTxegwEhLCCR/AwmL+QmxlrSn/XyNzcMe82C4F8XjCeh3hri3oOEsLQwNRwG4LZYRm5GeiRmTLXDcSq/OfVYv+eT2+Eo98aFQCQxBCwISfUjEWcvMX0Rv/tmChxs+vMACFRbQv9LucKLV38rF2AIrmPcsDw/LKbYCX01TshYNhUNpqlCHmMg== 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=k5XGYmp75cGggXd1SrrBmuy1PFWsuQhJAYzHoXgVgsc=; b=Lpafz8CZURtCw82/wNAEOCYSrNEPuitFrbaqTHoBE54eF+p0wYKVG1Ni0eU7I3elFrGamyzrcPNhqS44RjPy1ZSSVHLMSKbo+rAHQwtoYZHGVLXJsZP+2p8LrNk9OPsK/toR3xmsPijJeAHBO06ne5GoDj0xi9Pr4CQZ1YTHEVmPImvlSCXnAvYTOMDPiKyBFFBBTQIm0D4Pg8jGOShPGTiveoQkTFSyZT+NADTbgABLrKpWVl0lLvqRNltN4c0uinUUhFXRXVQVtEaDf6+Yeg1+l5Y3nF3B1a9mpAwbFUc33OkwNszpf/R662de8z5OUkD/5SY/HOjS7q9BbA4fUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k5XGYmp75cGggXd1SrrBmuy1PFWsuQhJAYzHoXgVgsc=; b=ApcD26QT3O+orBsrQQgwXQDdZOQKuMDQHfEL7kZLbc4LqqqAt1MMy/Szcvcm+KTovICwcsL8IswoN2FfTgKZD696lD36tgUcXbScWo3UdJFk0WiaJX6XNaFWl0KUJFmH9b/V9QmU9p0ci+yf1xgM2TAjOA/VXppx1UbWR/veZNc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from PSAPR06MB4021.apcprd06.prod.outlook.com (2603:1096:301:37::11) by PS1PR0601MB1849.apcprd06.prod.outlook.com (2603:1096:803:6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Mon, 6 Dec 2021 01:45:00 +0000 Received: from PSAPR06MB4021.apcprd06.prod.outlook.com ([fe80::ad23:f8da:4661:7fe7]) by PSAPR06MB4021.apcprd06.prod.outlook.com ([fe80::ad23:f8da:4661:7fe7%7]) with mapi id 15.20.4755.021; Mon, 6 Dec 2021 01:45:00 +0000 From: Bernard Zhao <bernard@vivo.com> To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Bernard Zhao <bernard@vivo.com>, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] sound/core: remove useless NULL check before kfree Date: Sun, 5 Dec 2021 17:40:46 -0800 Message-Id: <20211206014135.320720-1-bernard@vivo.com> X-Mailer: git-send-email 2.33.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: HKAPR04CA0011.apcprd04.prod.outlook.com (2603:1096:203:d0::21) To PSAPR06MB4021.apcprd06.prod.outlook.com (2603:1096:301:37::11) MIME-Version: 1.0 Received: from ubuntu.localdomain (203.90.234.87) by HKAPR04CA0011.apcprd04.prod.outlook.com (2603:1096:203:d0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.14 via Frontend Transport; Mon, 6 Dec 2021 01:44:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1c87c6b4-0e4f-4906-27a9-08d9b85a03aa X-MS-TrafficTypeDiagnostic: PS1PR0601MB1849: X-Microsoft-Antispam-PRVS: <PS1PR0601MB184936A5B95634DE952EFDE7DF6D9@PS1PR0601MB1849.apcprd06.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:126; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mPx9LCiIPkBH97mj4orCSTZfJ25qV7yYZCvKbSm1JZLVwrExvca6GsAiJxpOS6PeJRH0ETjr3xxzZnvVdd2s+O1gNArbvTM6eL86SD559/kWJ7KTmxchg3IM/HHJ92nws57dnDZfElwN+9d7ViDgT1Qjiy4SLO/Ij9v69G9l5zWnaWnQ62X8Oak8mQbmy9XLS3dIxE8dkY7kdonkD6up2/sCni/ToDWG8POPI3P5MuFm3gFr3JJxEchepEUB0A825Ip+8Ktw+wMBoPgbIOTFX3E+XkgZ+wY6q9eYPnv/HhTxk9+Oio+nGPB0JHx5hRmySlNWa2q+m9j9vfcL5uAHY7PysLs6bMxNEdX2IQWQPmlBqWcScdRoAgDU+SeCrDTyZZN2a7wmHYHGnOx0haQB/hszxPmQ13g5qsaFC1YjOfhCL+hMfChe2+S9YuzY6YfQEXQxZh7i+n1wrZsdwtH1MOkc3yTSoURzhnO1jsNiBtwbaI4OYdV7t+NCYY5jRWd0mVmeLz/k5tDg7Rx1+pIfSaEKtbycWCAXZA7n8KZyhhf+bsZyWUC1xNIy9liybVzZ58W9veBXUJOfu9VoeHBCeDXC6jfTatDTiV8BdS3FLHSXi4X7d4zDaThu9yQ2qU8Hfm32nLNq+xm6Eou/T533ZTBPEo/WuK5e8xi3F6FRwvLEhjsLvF4Ix3/IVjgESWFn/vQBzBwOhuMKstbtOjaycQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PSAPR06MB4021.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(6506007)(316002)(508600001)(6666004)(186003)(8676002)(4744005)(86362001)(26005)(8936002)(110136005)(83380400001)(956004)(6486002)(6512007)(38100700002)(1076003)(2906002)(2616005)(5660300002)(52116002)(36756003)(66476007)(38350700002)(66556008)(66946007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HUeYNYkYiBdgD2q/YBPk6URuaT/ln3M17hkHYwMPwMWnpUKlsZk/SqzGvdXTFBAMvI2MUJPcPRZgd0H2avrskc0HnBEdLDjv5LiMUZaBAv5WPP5QfVW2x+X1sBvnNZNNA9aGiORYtalJkBJIjqpeAvOHD4wb5eWu1+LhcklIYEzE/v0ss+P1semloYbLZG+wbwNErBZOtPQuRzThmxxSM4kT4YcQ2LrKRYK94G2KdyMjUYkXX1DodT6LMcPUwH/45Z5Gktd4tEjDdEwA37QY0gvpoLj0T0TyMEBTVuozgaAnzgjxpt5TN3YjXGgZzI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FA5c21XyTP1SrGGHIZCvw/WTaVHvy00ZihhFokXikkUgvYODB72+zJWXgRPRIeyOeSaXvbEN9q0QT585ZlbG69ajUD1/l3TeANB25pQmtoWQez2u4MMX0yH19F9Ye1+gefy+DzD9yYl1YAj9OjhPGBpz++Irf9uvssrZsWwf5ozYW/8rMr33wm49eoMSrymRHZlZizouXtSOR2vWOpfGTKuZWKw2VHXyg5nA+3uHiE4mpZAslJPqjNi88ym3LbNBPKi1WBJBOHN5PivPGPvI= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c87c6b4-0e4f-4906-27a9-08d9b85a03aa X-MS-Exchange-CrossTenant-AuthSource: PSAPR06MB4021.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2021 01:45:00.1123 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RRSX5AQzLhbqkAOUavXAMIzTsBXNVw+o7+g3iPKiIFkDGrXbhWD9zbmq5BLBrOyRdrvM+Qxu7Xo3pG2cvtjO+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR0601MB1849 X-Mailman-Approved-At: Mon, 06 Dec 2021 10:24:03 +0100 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" <alsa-devel.alsa-project.org> List-Unsubscribe: <https://mailman.alsa-project.org/mailman/options/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe> List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel/> List-Post: <mailto:alsa-devel@alsa-project.org> List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help> List-Subscribe: <https://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=subscribe> Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" <alsa-devel-bounces@alsa-project.org> |
Series |
sound/core: remove useless NULL check before kfree
|
expand
|
diff --git a/sound/core/info_oss.c b/sound/core/info_oss.c index 1ba887c7954e..ebc714b2f46b 100644 --- a/sound/core/info_oss.c +++ b/sound/core/info_oss.c @@ -32,10 +32,8 @@ int snd_oss_info_register(int dev, int num, char *string) mutex_lock(&strings); if (string == NULL) { x = snd_sndstat_strings[num][dev]; - if (x) { - kfree(x); - x = NULL; - } + kfree(x); + x = NULL; } else { x = kstrdup(string, GFP_KERNEL); if (x == NULL) {
Tis patch try to remove useless NULL check before kfree Signed-off-by: Bernard Zhao <bernard@vivo.com> --- sound/core/info_oss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)