diff --git a/pkg/azurefile/azurefile.go b/pkg/azurefile/azurefile.go index 3e7a6e5e82..7cd43c0624 100644 --- a/pkg/azurefile/azurefile.go +++ b/pkg/azurefile/azurefile.go @@ -1080,8 +1080,8 @@ func (d *Driver) GetTotalAccountQuota(ctx context.Context, subsID, resourceGroup // RemoveStorageAccountTag remove tag from storage account func (d *Driver) RemoveStorageAccountTag(ctx context.Context, subsID, resourceGroup, account, key string) error { - if d.cloud == nil { - return fmt.Errorf("cloud is nil") + if d.cloud == nil || d.cloud.StorageAccountClient == nil { + return fmt.Errorf("cloud or StorageAccountClient is nil") } // search in cache first cache, err := d.skipMatchingTagCache.Get(account, azcache.CacheReadTypeDefault)