mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-19 00:54:41 +08:00
habanalabs: initialize variable explicitly
Fix warning of "warning: ‘old_base’ may be used uninitialized in this function" Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
6d24b4d17d
commit
b596ad6f11
@ -52,7 +52,7 @@ static int hl_access_sram_dram_region(struct hl_device *hdev, u64 addr, u64 *val
|
|||||||
enum debugfs_access_type acc_type, enum pci_region region_type)
|
enum debugfs_access_type acc_type, enum pci_region region_type)
|
||||||
{
|
{
|
||||||
struct pci_mem_region *region = &hdev->pci_mem_region[region_type];
|
struct pci_mem_region *region = &hdev->pci_mem_region[region_type];
|
||||||
u64 old_base, rc;
|
u64 old_base = 0, rc;
|
||||||
|
|
||||||
if (region_type == PCI_REGION_DRAM) {
|
if (region_type == PCI_REGION_DRAM) {
|
||||||
old_base = hl_set_dram_bar(hdev, addr);
|
old_base = hl_set_dram_bar(hdev, addr);
|
||||||
|
Loading…
Reference in New Issue
Block a user