Skip to content

Commit

Permalink
fixed codeQL error
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrey1330 committed Aug 21, 2024
1 parent f8f7d8a commit 2459065
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/spdk/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ func (cs *controllerServer) publishVolume(req *csi.CreateVolumeRequest, volumeID
if err != nil {
return nil, err
}
if _, ok := req.GetParameters()["type"]; ok {

if volType, ok := req.GetParameters()["type"]; ok && volType == "cache" {
var hostID string
hostID, err = cs.spdkNode.GetVolumeHostID(spdkVol.lvolID)
if err != nil {
Expand Down

0 comments on commit 2459065

Please sign in to comment.