Re: [PATCH v2] scsi: ufs: ufshcd-pltfrm: check the return value of devm_kstrdup()
From: Bean Huo
Date: Mon Jan 17 2022 - 04:02:19 EST
On Sun, 2022-01-16 at 11:06 +0800, xkernel.wang@xxxxxxxxxxx wrote:
> From: Xiaoke Wang <xkernel.wang@xxxxxxxxxxx>
>
>
>
> 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 <xkernel.wang@xxxxxxxxxxx>
Reviewed-by: Bean Huo <beanhuo@xxxxxxxxxx>