Skip to content
Commit a56af062 authored by Chunyan Zhang's avatar Chunyan Zhang Committed by Joerg Roedel
Browse files

iommu/sprd: Fix parameter type warning



The second parameter of clk_get_optional() is "const char *", so use NULL
instead of integer 0 to fix a sparse warning like:

">> drivers/iommu/sprd-iommu.c:456:42: sparse: sparse: Using plain integer as NULL pointer"

Also this patch changes to use the resource-managed variant of
clk_get_optional(), then there's no need to add clk_put() which
is missed in the current driver.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarChunyan Zhang <chunyan.zhang@unisoc.com>
Link: https://lore.kernel.org/r/20210331031645.1001913-1-zhang.lyra@gmail.com
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 0bb868e1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment