Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2961815pxb; Mon, 17 Jan 2022 09:03:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9w9qBXSlPOol9mdpuXIFXiu7L97KBGicybCQWSSWewlKIM9D3uW9r6Jc2a0cms0FjsP5o X-Received: by 2002:a17:902:9006:b0:14a:930e:cc95 with SMTP id a6-20020a170902900600b0014a930ecc95mr15541682plp.9.1642439039305; Mon, 17 Jan 2022 09:03:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642439039; cv=none; d=google.com; s=arc-20160816; b=Kh0Me82krCcM92rBlMqOIvMq08qGR4vLDWxGwYhq+L0tFTkvlmzOXwcBUSVAZFTlOu 1xYN3xfCxWm98LufqwvMhiQpMII9uC0W1XeF76ZUnZjdP/x+fXqgAnioA1zhuH1NpgF0 +Yhd1wHFYfbN0CgXhtZggUyKdnirWQMfhVPc4LFqi5yDsppci7qMv5UZz7X8KNZOmYKJ aXdQipHIVAdT5MT8Adfi+oFLb6iqs6sBRHouVx9JSi8x43LHmJ9f8jICKDeWDDwSyvX3 4D+7aKB8GeTFadgin0q0PNhT/Rr2QejVfmYgv1roMUmQTq2NN55jfM/Q7y2ZZkC+6vVE YWNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=pKQyE8WmRVKRRSfCnHXiQ2iVbjjWgAi/p8fAcfN9+Bw=; b=XWIuULCJu6e5OKBX5kM2ziNO0+GOyOye0IYRaVcodlhZyVsyTOLvAfdDgiEqvQn0b8 Vid0MyLQ+eQbOwjA3TzyD0OakWrtS+WZxjAks+zfK5vUBb0VimHF+115qNo/lZOGgBCC cf4ssyNL82dKWnNGigHc9a09uRwAuNapF1QL6lfkr7hfCT/9ctJroxCJOAISbvItdWJ9 rsu79TNep9usPonlmeyBApLhOmglFLzNCPWbviiccLrLb++BklVMruEZ2sEZJYXxTUcZ Jt9VWYS6SuunFYT1lNgmt5Qon9+GEJzp33+R9lzjxwy9WAhTi/vqoHAqFRR46oD9wcCW Qd/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YffBhN65; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d20si14323862pgl.159.2022.01.17.09.03.46; Mon, 17 Jan 2022 09:03:59 -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=@gmail.com header.s=20210112 header.b=YffBhN65; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233587AbiAQJCQ (ORCPT + 99 others); Mon, 17 Jan 2022 04:02:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233580AbiAQJCK (ORCPT ); Mon, 17 Jan 2022 04:02:10 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F860C06173F; Mon, 17 Jan 2022 01:02:08 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id p18so18707740wmg.4; Mon, 17 Jan 2022 01:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=pKQyE8WmRVKRRSfCnHXiQ2iVbjjWgAi/p8fAcfN9+Bw=; b=YffBhN651/Z0BklBOyvA5ZOyGu8rIBJ8+YLlWg9M5uzMmi3n/Ak+YV9GY055jAmx71 jd/YTSomGNRGaf7STMxfmc+MUVl/vNg5HUCaqfi8thzuZvr08jlzhVo+ra2zq8ZTMhYX 0GaNUMsAh/p2ww0u5GsePmMY5qI5AQ0lSPDLNiMlg9cRqp7nYNUX+nENOeHvw0bKxEsU 1LpRSC0G0L1X8JsfrlTkHQ7Ib8bPiUuUzvlZP4L3R+F+o2QyyOqSSPjMSZ5wKmi8MPjE ojYQVV/sbjRl9UGzxDug3wohHgwKdYsuCYgOHLAJIGasNTTX85gbMtJeKU7zv041mW8Y EKXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=pKQyE8WmRVKRRSfCnHXiQ2iVbjjWgAi/p8fAcfN9+Bw=; b=KG0Q89WRqnbYUsBDWd0q76V5T3+U+BclrmUUtec2bmTIhj1+G4FIzeTqlsUo2mn64b MBfHcRxZXUd+M5ig5tKFg5mDhb3XkXcJvdhjttyFHo/sKkkEzcAPlVnhve5/n5pFaztm U39Ipir++clrnqbuIB78ZoUZPB37qCHJlUHo2pOSLqTkugy11D2EuVzcH7MLMWKGiqXi VHpTHHXykuE1xiAY/FzY0TqIV8V3UD/Lan3jyfTOOc1NWTmxLoHzpto7losoSAauZpix c7SCM4G/98NuUc2n3zCv02OqshK+RU5UV+1JP3xW/wTBW0KE59hDmwZ9VOJmRMnZy7Gv cyJg== X-Gm-Message-State: AOAM5330SPNxl03FcDCUz7QIwe+qHdzpauIJMbEaQqdJnNFxd/ApfJAA 7tkhBo6ehyC0ujOn4YwOdKE= X-Received: by 2002:a5d:6dd1:: with SMTP id d17mr19500538wrz.520.1642410127168; Mon, 17 Jan 2022 01:02:07 -0800 (PST) Received: from ubuntu-laptop (p4fd59309.dip0.t-ipconnect.de. [79.213.147.9]) by smtp.googlemail.com with ESMTPSA id f9sm14810512wry.115.2022.01.17.01.02.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 01:02:06 -0800 (PST) Message-ID: Subject: Re: [PATCH v2] scsi: ufs: ufshcd-pltfrm: check the return value of devm_kstrdup() From: Bean Huo To: xkernel.wang@foxmail.com, bvanassche@acm.org, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 17 Jan 2022 10:02:05 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2022-01-16 at 11:06 +0800, xkernel.wang@foxmail.com wrote: > From: Xiaoke Wang > > > > devm_kstrdup() returns pointer to allocated string on success, > > NULL on failure. So it is better to check the return value of it. > > > > Signed-off-by: Xiaoke Wang Reviewed-by: Bean Huo