diff mbox series

[1/7] cxl/mem: Use dev instead of pdev->dev

Message ID 20210407222625.320177-2-ben.widawsky@intel.com (mailing list archive)
State Not Applicable, archived
Headers show
Series Enumerate HDM Decoder registers | expand

Commit Message

Ben Widawsky April 7, 2021, 10:26 p.m. UTC
Trivial cleanup.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
---
 drivers/cxl/mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonathan Cameron April 8, 2021, 5:08 p.m. UTC | #1
On Wed, 7 Apr 2021 15:26:19 -0700
Ben Widawsky <ben.widawsky@intel.com> wrote:

> Trivial cleanup.

Obviously correct :)

> 
> Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
FWIW
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  drivers/cxl/mem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c
> index b6fe4e81d38a..99534260034e 100644
> --- a/drivers/cxl/mem.c
> +++ b/drivers/cxl/mem.c
> @@ -935,7 +935,7 @@ static struct cxl_mem *cxl_mem_create(struct pci_dev *pdev, u32 reg_lo,
>  	u8 bar;
>  	int rc;
>  
> -	cxlm = devm_kzalloc(&pdev->dev, sizeof(*cxlm), GFP_KERNEL);
> +	cxlm = devm_kzalloc(dev, sizeof(*cxlm), GFP_KERNEL);
>  	if (!cxlm) {
>  		dev_err(dev, "No memory available\n");
>  		return NULL;
diff mbox series

Patch

diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c
index b6fe4e81d38a..99534260034e 100644
--- a/drivers/cxl/mem.c
+++ b/drivers/cxl/mem.c
@@ -935,7 +935,7 @@  static struct cxl_mem *cxl_mem_create(struct pci_dev *pdev, u32 reg_lo,
 	u8 bar;
 	int rc;
 
-	cxlm = devm_kzalloc(&pdev->dev, sizeof(*cxlm), GFP_KERNEL);
+	cxlm = devm_kzalloc(dev, sizeof(*cxlm), GFP_KERNEL);
 	if (!cxlm) {
 		dev_err(dev, "No memory available\n");
 		return NULL;