Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp96024pxm; Tue, 22 Feb 2022 07:03:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyY2wNjBrWq6am93OjW5tpH3nK9GjYn02sAQ6sIwDokJ662QOw3ZGBCfrvzYrJiGHysLfyc X-Received: by 2002:a17:906:58b:b0:6cf:65f5:de28 with SMTP id 11-20020a170906058b00b006cf65f5de28mr19165124ejn.614.1645542225891; Tue, 22 Feb 2022 07:03:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645542225; cv=none; d=google.com; s=arc-20160816; b=AXpskeYm3fdIeasFRC9Ggi+SHDNppa+Qq+BuMUchR/f+KnbKnnTDsHkr9QVYjhATAf L4wXaiIJZF+HO9q1IarXwSjeSUy7QbZQR7yquwzeUuHiftAnc633cNrMHLvaU9co65nB DwOx5bBX2xhiC/GqZFZjuM5GtsUx9rGWqYuHwpaK507Oy3KqwJL+wsSEsJhgRiw2AuaP w6dmTSmDFqilACVWTTZdPIGVa/ms6/R80itcvpaO5Lh2b/Z5GeclfT5HY3Tt8oocVMOr PZrzX1QvQX0GIYRJnYOd6eLyb79W2y1fdwl7El3Wq8xPh25Ht6fBwNc7e27b3sX47784 07cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tCoZe2yzRkWx7YBNb8KVNP+e9eczVEpZUbOGuRodh+c=; b=dUZyq1cjTFHW2yCgZonJ8G83ukmSYR2MUG55Pob1X2rs3YxPUvkvcT0746AH+PXSTt TWCZvZAoe4pxNFlZIqT+3l8BmogRIGkScI6gLbC7IrNR+23mvrl27sonByWRWrOOmt7w t8AUnnFsw0Dv0o66BxPftp2RWhSGHLGpUEKPfWD6st0i97TprJ3Rux3k/2d7oz6HyYbD j2e1sdYloE6FqNdvx7SQPUrbVKD4rech620xTHBXSG53k1ANZj0EbfM/WiJ+4AcenN0T jKFsSc/tN10zr+vAJylVZb0gQOC5BXvcYsCMOPbAc8xWPavJKlFicw04Yt1+Wk8UDXKm FMOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=E1cyq17L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u3si9706606ejm.749.2022.02.22.07.03.21; Tue, 22 Feb 2022 07:03:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=E1cyq17L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231967AbiBVMjI (ORCPT + 99 others); Tue, 22 Feb 2022 07:39:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbiBVMjH (ORCPT ); Tue, 22 Feb 2022 07:39:07 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38F6A10C531 for ; Tue, 22 Feb 2022 04:38:39 -0800 (PST) Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id D4BDE3FCAC for ; Tue, 22 Feb 2022 12:38:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645533517; bh=tCoZe2yzRkWx7YBNb8KVNP+e9eczVEpZUbOGuRodh+c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=E1cyq17LN9Gbq6HFbjl0wlrrZ9GSSuV/g8M6d/YVuyFCKEhfS6oIxkqJN1kC2Dprh IWzirtTidad3oZnB8EtGIR3E+FDBQGlC1zvq++jTfDpZyDyXyy1dHFd/UKtqA6BH5j J9vGSWRMojzrRMw0t5g+xn0EGF/aumJDG13d4wYe0xLheVSv05isf8Rp+AcQkNynWH K4y7J0GdmyMKMg22ELXjOM/WUXL7YFlpoVPiczVq9jTOD4of5mwqu9hi4rn+wytFk/ 63EiCxe7nBHc3qcZX/Yg/iewFpIvx69bXw9yMVYd8hBNFk4Z7lqrdy05LtsJeb2qep rHUF7uWpjWlIA== Received: by mail-ej1-f70.google.com with SMTP id kw5-20020a170907770500b006ba314a753eso5685485ejc.21 for ; Tue, 22 Feb 2022 04:38:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=tCoZe2yzRkWx7YBNb8KVNP+e9eczVEpZUbOGuRodh+c=; b=tURnebzIDR1g08r/IHrntVrzsgFVP+nFtem8Sxw0rQod2gFxDaV88Vr/lDVDIszTcv cwH1vMCEpgYG/QyXXP90h28R2sjQAWHj3yeklSEty8y9BWk/RxDrwx++OHKYIvypQiUh DFLtX3Yo28/AttjEyLIwnSE3rxDPmcMT7gd9/sonMBiRydDsGIH/18rNdOgrwiJEAGAJ 8gPgXcoVKVYUbsONHHp16ZPxJljXDo6cKxKX1XikPrBiUZFDPpp8FNhJ0DCG72p3XOcq J6KBWoYqeTTaABKnP7DytY4T7IFVZPuNcbwTic+6beep5A/FejQMHrJ+VH+BaF5h4wdW Rw5A== X-Gm-Message-State: AOAM533jFeXxU49YmXaDi1YbxcKPjRrVP73UwHwHPxkoYbvjZ1eZnbTp FLrZ+vD92gUiXNDqRBu22UNS0vY6DQvQpLpzTrqHtiBsVg3L+xFx6HnnKXFMsjhwUAzDE1+Ft8b toh1fwN0U3nffp9xDDpeSBDPcw3kgacqRYg8a76x7Lg== X-Received: by 2002:a50:f159:0:b0:411:29b9:1323 with SMTP id z25-20020a50f159000000b0041129b91323mr25718217edl.258.1645533517381; Tue, 22 Feb 2022 04:38:37 -0800 (PST) X-Received: by 2002:a50:f159:0:b0:411:29b9:1323 with SMTP id z25-20020a50f159000000b0041129b91323mr25718207edl.258.1645533517239; Tue, 22 Feb 2022 04:38:37 -0800 (PST) Received: from [192.168.0.124] (xdsl-188-155-181-108.adslplus.ch. [188.155.181.108]) by smtp.gmail.com with ESMTPSA id s11sm6401498edt.10.2022.02.22.04.38.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Feb 2022 04:38:36 -0800 (PST) Message-ID: <83aa53cb-e444-9397-96d2-eaeb92db6492@canonical.com> Date: Tue, 22 Feb 2022 13:38:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] ASoC: samsung: i2s: check the return value of kstrdup() Content-Language: en-US To: xkernel.wang@foxmail.com, tiwai@suse.com, perex@perex.cz Cc: s.nawrocki@samsung.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,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 22/02/2022 12:53, xkernel.wang@foxmail.com wrote: > From: Xiaoke Wang > > kstrdup() is a memory allocation function which can return NULL when > some internal memory errors happen. It is better to check the return > value of it to catch the error in time. > > Signed-off-by: Xiaoke Wang > --- > sound/soc/samsung/i2s.c | 4 ++++ > 1 file changed, 4 insertions(+) > Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof