diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp
index 300822f9..55fd30cb 100644
--- a/src/libcamera/software_isp/debayer_egl.cpp
+++ b/src/libcamera/software_isp/debayer_egl.cpp
@@ -97,7 +97,7 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf
 	return -EINVAL;
 }
 
-int DebayerEGL::getShaderVariableLocations(void)
+void DebayerEGL::getShaderVariableLocations(void)
 {
 	attributeVertex_ = glGetAttribLocation(programId_, "vertexIn");
 	attributeTexture_ = glGetAttribLocation(programId_, "textureIn");
@@ -127,7 +127,6 @@ int DebayerEGL::getShaderVariableLocations(void)
 			    << " stride_factor " << textureUniformStrideFactor_
 			    << " tex_bayer_first_red " << textureUniformBayerFirstRed_
 			    << " proj_matrix " << textureUniformProjMatrix_;
-	return 0;
 }
 
 int DebayerEGL::initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat)
@@ -268,7 +267,9 @@ int DebayerEGL::initBayerShaders(PixelFormat inputFormat, PixelFormat outputForm
 		return -ENODEV;
 	}
 
-	return getShaderVariableLocations();
+	getShaderVariableLocations();
+
+	return 0;
 }
 
 int DebayerEGL::configure(const StreamConfiguration &inputCfg,
diff --git a/src/libcamera/software_isp/debayer_egl.h b/src/libcamera/software_isp/debayer_egl.h
index 30e51a47..20c8a0b1 100644
--- a/src/libcamera/software_isp/debayer_egl.h
+++ b/src/libcamera/software_isp/debayer_egl.h
@@ -64,7 +64,7 @@ public:
 private:
 	static int getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config);
 	int initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat);
-	int getShaderVariableLocations();
+	void getShaderVariableLocations();
 	void setShaderVariableValues(eGLImage &eGLImageIn, const DebayerParams &params);
 	int debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams &params, std::optional<MappedFrameBuffer> *mappedInputBuffer, std::optional<DmaSyncer> *inputBufferDmaSyncer);
 
