Message ID | 20230803081812.1446282-1-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | b6d128f89a85771433a004e8656090ccbe1fb969 |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | ufs: host: renesas: Fix private allocation | expand |
On 8/3/23 01:18, Yoshihiro Shimoda wrote: > Should use devm_kzalloc() for struct ufs_renesas_priv because > the .initialized should be false as default. > > Fixes: d69520288efd ("scsi: ufs: ufs-renesas: Add support for Renesas R-Car UFS controller") > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > --- > drivers/ufs/host/ufs-renesas.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/ufs/host/ufs-renesas.c b/drivers/ufs/host/ufs-renesas.c > index f8a5e79ed3b4..ab0652d8705a 100644 > --- a/drivers/ufs/host/ufs-renesas.c > +++ b/drivers/ufs/host/ufs-renesas.c > @@ -359,7 +359,7 @@ static int ufs_renesas_init(struct ufs_hba *hba) > { > struct ufs_renesas_priv *priv; > > - priv = devm_kmalloc(hba->dev, sizeof(*priv), GFP_KERNEL); > + priv = devm_kzalloc(hba->dev, sizeof(*priv), GFP_KERNEL); > if (!priv) > return -ENOMEM; > ufshcd_set_variant(hba, priv); Reviewed-by: Bart Van Assche <bvanassche@acm.org>
On Thu, 03 Aug 2023 17:18:12 +0900, Yoshihiro Shimoda wrote: > Should use devm_kzalloc() for struct ufs_renesas_priv because > the .initialized should be false as default. > > Applied to 6.5/scsi-fixes, thanks! [1/1] ufs: host: renesas: Fix private allocation https://git.kernel.org/mkp/scsi/c/b6d128f89a85
diff --git a/drivers/ufs/host/ufs-renesas.c b/drivers/ufs/host/ufs-renesas.c index f8a5e79ed3b4..ab0652d8705a 100644 --- a/drivers/ufs/host/ufs-renesas.c +++ b/drivers/ufs/host/ufs-renesas.c @@ -359,7 +359,7 @@ static int ufs_renesas_init(struct ufs_hba *hba) { struct ufs_renesas_priv *priv; - priv = devm_kmalloc(hba->dev, sizeof(*priv), GFP_KERNEL); + priv = devm_kzalloc(hba->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; ufshcd_set_variant(hba, priv);
Should use devm_kzalloc() for struct ufs_renesas_priv because the .initialized should be false as default. Fixes: d69520288efd ("scsi: ufs: ufs-renesas: Add support for Renesas R-Car UFS controller") Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- drivers/ufs/host/ufs-renesas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)