[VOL-4206]: Fix for error message not coming on voltctl

Change-Id: I66f57c95048bff10d8f4fa3a5fb97cc83936ca5a
diff --git a/internal/pkg/onuadaptercore/openonu.go b/internal/pkg/onuadaptercore/openonu.go
index 2fabadd..c790592 100644
--- a/internal/pkg/onuadaptercore/openonu.go
+++ b/internal/pkg/onuadaptercore/openonu.go
@@ -836,8 +836,8 @@
 func (oo *OpenONUAC) Get_onu_images(ctx context.Context, deviceID string) (*voltha.OnuImages, error) {
 	logger.Infow(ctx, "Get_onu_images", log.Fields{"device-id": deviceID})
 	if handler := oo.getDeviceHandler(ctx, deviceID, false); handler != nil {
-		var err error
-		if images, err := handler.getOnuImages(ctx); err == nil {
+		images, err := handler.getOnuImages(ctx)
+		if err == nil {
 			return images, nil
 		}
 		return nil, fmt.Errorf(fmt.Sprintf("%s-%s", err, deviceID))